Class: TrustyCms::ResourceResponses::Collector

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/trusty_cms/resource_responses.rb

Instance Method Summary collapse

Methods inherited from OpenStruct

#method_missing

Constructor Details

#initializeCollector

Returns a new instance of Collector.



52
53
54
55
# File 'lib/trusty_cms/resource_responses.rb', line 52

def initialize
  super
  @table = Hash.new { |h, k| h[k] = Response.new }
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class OpenStruct

Instance Method Details

#initialize_copy(orig) ⇒ Object



57
58
59
60
61
62
# File 'lib/trusty_cms/resource_responses.rb', line 57

def initialize_copy(orig)
  super
  @table.keys.each do |key|
    @table[key] = orig.send(key).dup
  end
end