Class: Addresses

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from(source) ⇒ Object



50
51
52
53
54
55
56
# File 'lib/order_address.rb', line 50

def self.from(source)
  doc = Nokogiri::HTML(source)

  Addresses.new(
    doc.css(".l-section.m-addressSelect .addressSelect_content").map { |el| Address.new(el) }
  )
end

Instance Method Details

#selection_listObject



58
59
60
# File 'lib/order_address.rb', line 58

def selection_list
  map(&:list_item)
end