Class: Round::AddressCollection

Inherits:
Collection show all
Defined in:
lib/round/address.rb

Instance Attribute Summary

Attributes inherited from Collection

#collection

Attributes inherited from Base

#resource

Instance Method Summary collapse

Methods inherited from Collection

#[], #add, #initialize, #method_missing, #populate_data, #refresh

Methods inherited from Base

association, hash_identifier, #hash_identifier, #initialize, #method_missing, #refresh

Constructor Details

This class inherits a constructor from Round::Collection

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Round::Collection

Instance Method Details

#content_typeObject



10
11
12
# File 'lib/round/address.rb', line 10

def content_type
  Round::Address
end

#createObject



14
15
16
17
18
19
# File 'lib/round/address.rb', line 14

def create
  resource = @resource.create
  address = Round::Address.new(resource: resource, client: @client)
  self.add(address)
  address
end