Class: Address

Inherits:
Object
  • Object
show all
Defined in:
lib/order_address.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#addressObject

Returns the value of attribute address.



64
65
66
# File 'lib/order_address.rb', line 64

def address
  @address
end

#estimationObject

Returns the value of attribute estimation.



64
65
66
# File 'lib/order_address.rb', line 64

def estimation
  @estimation
end

#idObject

Returns the value of attribute id.



64
65
66
# File 'lib/order_address.rb', line 64

def id
  @id
end

#labelObject

Returns the value of attribute label.



64
65
66
# File 'lib/order_address.rb', line 64

def label
  @label
end

Instance Method Details

#list_itemObject



73
74
75
# File 'lib/order_address.rb', line 73

def list_item
  [label, address, estimation].join("\n    ")
end