Class: SellObject::FormatterProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/sell_object/formatter_proxy.rb

Direct Known Subclasses

Buscape::FormatterProxy

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target_object) ⇒ FormatterProxy

Returns a new instance of FormatterProxy.



5
6
7
# File 'lib/sell_object/formatter_proxy.rb', line 5

def initialize(target_object)
	self.target = target_object
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object (private)



11
12
13
# File 'lib/sell_object/formatter_proxy.rb', line 11

def method_missing(method, *args, &block)
	target.send(args.first).to_s
end

Instance Attribute Details

#targetObject

Returns the value of attribute target.



3
4
5
# File 'lib/sell_object/formatter_proxy.rb', line 3

def target
  @target
end