Class: Munchsrb::Gather::PageObject::MenuPage

Inherits:
SitePrism::Page
  • Object
show all
Defined in:
lib/munchsrb/gather/page_object/pages.rb

Overview

MenuPage is Menu page of Munch’s Burger.

Instance Method Summary collapse

Instance Method Details

#detailsObject



26
27
28
29
30
31
32
# File 'lib/munchsrb/gather/page_object/pages.rb', line 26

def details
  menu_items.map do |item|
    name = Unicode.nfkc(item.name.text.split("\n").last)
    price = item.price.text.delete(',').match(/¥(?<price>\d+)/)[:price].to_i
    { name: name, price: price }
  end
end