Class: WTF::Dumper::Output
- Inherits:
-
Object
- Object
- WTF::Dumper::Output
- Defined in:
- lib/wtf/dumper.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
- #call(meth) ⇒ Object
-
#initialize(data) ⇒ Output
constructor
A new instance of Output.
Constructor Details
#initialize(data) ⇒ Output
Returns a new instance of Output.
114 115 116 |
# File 'lib/wtf/dumper.rb', line 114 def initialize(data) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
112 113 114 |
# File 'lib/wtf/dumper.rb', line 112 def data @data end |
Instance Method Details
#call(meth) ⇒ Object
118 119 120 121 122 123 124 |
# File 'lib/wtf/dumper.rb', line 118 def call(meth) if block = WTF.[meth] block.call(data) else send(meth) end end |