Class: GRI::Writer

Inherits:
Object show all
Defined in:
lib/gri/writer.rb

Constant Summary collapse

TYPES =
{}

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Writer

Returns a new instance of Writer.



17
18
# File 'lib/gri/writer.rb', line 17

def initialize options={}
end

Instance Attribute Details

#loopObject

Returns the value of attribute loop.



15
16
17
# File 'lib/gri/writer.rb', line 15

def loop
  @loop
end

Class Method Details

.create(wtype, options) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/gri/writer.rb', line 7

def self.create wtype, options
  if (klass = TYPES[wtype])
    options.select {|k, v| String === k}.each {|k, v|
      options[k.gsub('-', '_').intern] = v}
    klass.new options
  end
end