Class: CsvBuilder::Proxy

Inherits:
Object
  • Object
show all
Defined in:
lib/csv_builder/proxy.rb

Direct Known Subclasses

FilterProxy

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object (protected)



21
22
23
# File 'lib/csv_builder/proxy.rb', line 21

def method_missing(name, *args, &block)
  base.send(name, *args, &block)
end

Instance Attribute Details

#baseObject

Returns the value of attribute base.



12
13
14
# File 'lib/csv_builder/proxy.rb', line 12

def base
  @base
end

#optionsObject

Returns the value of attribute options.



12
13
14
# File 'lib/csv_builder/proxy.rb', line 12

def options
  @options
end

#targetObject

Returns the value of attribute target.



12
13
14
# File 'lib/csv_builder/proxy.rb', line 12

def target
  @target
end

Instance Method Details

#init(base, target, options = {}, &block) ⇒ Object



14
15
16
17
# File 'lib/csv_builder/proxy.rb', line 14

def init(base, target, options = {}, &block)
  @base, @target, @options = base, target, options
  block.call if block
end