Class: G5FoundationClient::Location
- Inherits:
-
Object
- Object
- G5FoundationClient::Location
- Extended by:
- FindableByUid
- Defined in:
- lib/g5_foundation_client/models/location.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#location_hash ⇒ Object
Returns the value of attribute location_hash.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ Location
constructor
A new instance of Location.
- #street_address ⇒ Object
Methods included from FindableByUid
Constructor Details
#initialize(attrs) ⇒ Location
Returns a new instance of Location.
6 7 8 9 |
# File 'lib/g5_foundation_client/models/location.rb', line 6 def initialize(attrs) self.client = attrs.delete(:client) || attrs.delete('client') self.location_hash = ActiveSupport::HashWithIndifferentAccess.new attrs.fetch(:location, attrs) end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
4 5 6 |
# File 'lib/g5_foundation_client/models/location.rb', line 4 def client @client end |
#location_hash ⇒ Object
Returns the value of attribute location_hash.
4 5 6 |
# File 'lib/g5_foundation_client/models/location.rb', line 4 def location_hash @location_hash end |
Instance Method Details
#street_address ⇒ Object
44 45 46 47 |
# File 'lib/g5_foundation_client/models/location.rb', line 44 def street_address return street_address_1 if street_address_2.blank? "#{street_address_1}\n#{street_address_2}" end |