Parent

Methods

Yell::Formatter::Builder

Builder class to allow setters that won't be accessible once transferred to the Formatter

Attributes

date_pattern[RW]
modifier[R]
pattern[RW]

Public Class Methods

new( pattern = nil, date_pattern = nil, &block ) click to toggle source
# File lib/yell/formatter.rb, line 159
def initialize( pattern = nil, date_pattern = nil, &block )
  @modifier = Modifier.new

  @pattern = case pattern
  when false then Yell::NoFormat
  when nil then Yell::DefaultFormat
  else pattern
  end

  @pattern << "\n" unless @pattern[-1] == \n\ # add newline if not present
  @date_pattern = date_pattern || :iso8601

  block.call(self) if block
end

Public Instance Methods

modify( key, &block ) click to toggle source
# File lib/yell/formatter.rb, line 174
def modify( key, &block )
  modifier.set(key, &block)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.