Class: Chaindotcom::Address
- Inherits:
-
Object
- Object
- Chaindotcom::Address
- Includes:
- Ghostly
- Defined in:
- lib/chaindotcom/address.rb
Instance Attribute Summary collapse
-
#hash ⇒ Object
Returns the value of attribute hash.
Attributes included from Ghostly
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(attributes = {}) ⇒ Address
constructor
A new instance of Address.
- #to_s ⇒ Object
Methods included from Ghostly
Constructor Details
#initialize(attributes = {}) ⇒ Address
Returns a new instance of Address.
44 45 46 47 48 49 |
# File 'lib/chaindotcom/address.rb', line 44 def initialize(attributes={}) attributes.each do |key, value| public_send("#{key}=", value) end @data_source ||= Chaindotcom::AddressMapper.new end |
Instance Attribute Details
#hash ⇒ Object
Returns the value of attribute hash.
35 36 37 |
# File 'lib/chaindotcom/address.rb', line 35 def hash @hash end |
Instance Method Details
#==(other) ⇒ Object
55 56 57 |
# File 'lib/chaindotcom/address.rb', line 55 def ==(other) other.is_a?(Address) && other.hash == hash end |
#to_s ⇒ Object
51 52 53 |
# File 'lib/chaindotcom/address.rb', line 51 def to_s inspect end |