Class: WTF::Dumper::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/wtf/dumper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dataObject (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.output_options[meth]
    block.call(data)
  else
    send(meth)
  end
end