Class: RubyReportable::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_reportable/output.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, options, block) ⇒ Output

Returns a new instance of Output.



5
6
7
8
9
# File 'lib/ruby_reportable/output.rb', line 5

def initialize(name, options, block)
  @name = name
  @options = options
  @logic = block
end

Instance Attribute Details

#logicObject

Returns the value of attribute logic.



3
4
5
# File 'lib/ruby_reportable/output.rb', line 3

def logic
  @logic
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/ruby_reportable/output.rb', line 3

def name
  @name
end

Instance Method Details

#[](key) ⇒ Object



11
12
13
# File 'lib/ruby_reportable/output.rb', line 11

def [](key)
  @options[key]
end

#[]=(key, value) ⇒ Object



15
16
17
# File 'lib/ruby_reportable/output.rb', line 15

def []=(key, value)
  @options[key] = value
end