Class: NationalRail::VirginLiveDepartureBoards::SummaryRow
- Inherits:
-
Object
- Object
- NationalRail::VirginLiveDepartureBoards::SummaryRow
- Defined in:
- lib/national-rail/virgin_live_departure_boards.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #details ⇒ Object
-
#initialize(agent, details_link, attributes) ⇒ SummaryRow
constructor
A new instance of SummaryRow.
Constructor Details
#initialize(agent, details_link, attributes) ⇒ SummaryRow
Returns a new instance of SummaryRow.
60 61 62 |
# File 'lib/national-rail/virgin_live_departure_boards.rb', line 60 def initialize(agent, details_link, attributes) @agent, @details_link, @attributes = agent, details_link, attributes end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
58 59 60 |
# File 'lib/national-rail/virgin_live_departure_boards.rb', line 58 def attributes @attributes end |
Instance Method Details
#[](key) ⇒ Object
64 65 66 |
# File 'lib/national-rail/virgin_live_departure_boards.rb', line 64 def [](key) @attributes[key] end |
#details ⇒ Object
68 69 70 71 72 73 74 75 |
# File 'lib/national-rail/virgin_live_departure_boards.rb', line 68 def details @agent.transact do page = @details_link.click VirginLiveDepartureBoards.capture(page, @details_link.href) parser = DetailsPageParser.new(page.doc) parser.parse end end |