Class: Google::Civic::Representation

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/google-civic/representation.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(representation, root_scope = nil) ⇒ Representation

Returns a new instance of Representation.



43
44
45
46
# File 'lib/google-civic/representation.rb', line 43

def initialize(representation, root_scope = nil)
  @root_scope = root_scope || representation
  super(representation)
end

Class Method Details

.has_many(association, options = {}) ⇒ Object



7
8
9
10
# File 'lib/google-civic/representation.rb', line 7

def has_many(association, options={})
  build_getter_for_ids(association)
  build_getter_for_collection(association, options)
end