Class: PicturehouseUk::Cinema::ListParser Private
- Inherits:
-
Object
- Object
- PicturehouseUk::Cinema::ListParser
- Defined in:
- lib/picturehouse_uk/cinema.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Utility class to parse the links spat out from the options
Instance Method Summary collapse
-
#initialize(nodes) ⇒ ListParser
constructor
private
A new instance of ListParser.
- #to_hash ⇒ Object private
Constructor Details
#initialize(nodes) ⇒ ListParser
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ListParser.
172 173 174 |
# File 'lib/picturehouse_uk/cinema.rb', line 172 def initialize(nodes) @nodes = nodes end |
Instance Method Details
#to_hash ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
176 177 178 179 180 |
# File 'lib/picturehouse_uk/cinema.rb', line 176 def to_hash @nodes.each_with_object({}) do |node, result| result[id(node)] = { name: name(node), url: url(node) } end end |