Class: Tube::Line
- Inherits:
-
Object
- Object
- Tube::Line
- Defined in:
- lib/tube/line.rb
Overview
Models the data gathered on a tube line from the tfl.gov.uk “Live travel news” page.
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#message ⇒ Object
Returns the value of attribute message.
-
#name ⇒ Object
Returns the value of attribute name.
-
#problem ⇒ Object
(also: #problem?)
Returns the value of attribute problem.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(id, name, status, problem, message = nil) ⇒ Line
constructor
:call-seq: Line.new(id, name, status, problem, message=nil).
Constructor Details
#initialize(id, name, status, problem, message = nil) ⇒ Line
:call-seq: Line.new(id, name, status, problem, message=nil)
Create a new Line.
15 16 17 18 19 20 21 |
# File 'lib/tube/line.rb', line 15 def initialize( id, name, status, problem, =nil ) @id = id @name = name @status = status @problem = problem = end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/tube/line.rb', line 7 def id @id end |
#message ⇒ Object
Returns the value of attribute message.
8 9 10 |
# File 'lib/tube/line.rb', line 8 def end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/tube/line.rb', line 8 def name @name end |
#problem ⇒ Object Also known as: problem?
Returns the value of attribute problem.
8 9 10 |
# File 'lib/tube/line.rb', line 8 def problem @problem end |
#status ⇒ Object
Returns the value of attribute status.
8 9 10 |
# File 'lib/tube/line.rb', line 8 def status @status end |