Class: Address
- Inherits:
-
Object
- Object
- Address
- Defined in:
- lib/order_address.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#estimation ⇒ Object
Returns the value of attribute estimation.
-
#id ⇒ Object
Returns the value of attribute id.
-
#label ⇒ Object
Returns the value of attribute label.
Instance Method Summary collapse
-
#initialize(element) ⇒ Address
constructor
A new instance of Address.
- #list_item ⇒ Object
Constructor Details
#initialize(element) ⇒ Address
Returns a new instance of Address.
66 67 68 69 70 71 |
# File 'lib/order_address.rb', line 66 def initialize(element) self.label = element.css(".addressSelect_labelName").text.strip self.address = element.css(".addressSelect_information_address").text.strip self.estimation = element.css(".time_content_text").text.strip self.id = element.css("input[name=todokeSeq]").first["value"].strip end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
64 65 66 |
# File 'lib/order_address.rb', line 64 def address @address end |
#estimation ⇒ Object
Returns the value of attribute estimation.
64 65 66 |
# File 'lib/order_address.rb', line 64 def estimation @estimation end |
#id ⇒ Object
Returns the value of attribute id.
64 65 66 |
# File 'lib/order_address.rb', line 64 def id @id end |
#label ⇒ Object
Returns the value of attribute label.
64 65 66 |
# File 'lib/order_address.rb', line 64 def label @label end |
Instance Method Details
#list_item ⇒ Object
73 74 75 |
# File 'lib/order_address.rb', line 73 def list_item [label, address, estimation].join("\n ") end |