Class: Epok::Object
- Inherits:
-
Object
- Object
- Epok::Object
- Defined in:
- lib/epok/object.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(id) ⇒ Object
constructor
A new instance of Object.
- #name ⇒ Object
- #normalized_address ⇒ Object
Constructor Details
#initialize(id) ⇒ Object
Returns a new instance of Object.
5 6 7 |
# File 'lib/epok/object.rb', line 5 def initialize(id) @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/epok/object.rb', line 3 def id @id end |
Instance Method Details
#content ⇒ Object
17 18 19 20 21 22 |
# File 'lib/epok/object.rb', line 17 def content object["contenido"].each_with_object({}) do |entry, hash| name, value = entry.values_at("nombre", "valor") hash[name] = value unless value.empty? end end |
#name ⇒ Object
9 10 11 |
# File 'lib/epok/object.rb', line 9 def name content["Nombre"] end |
#normalized_address ⇒ Object
13 14 15 |
# File 'lib/epok/object.rb', line 13 def normalized_address object["direccionNormalizada"] end |