Class: Selections::Session
- Inherits:
-
Object
- Object
- Selections::Session
- Defined in:
- app/selections/session.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(line) ⇒ Session
constructor
A new instance of Session.
- #to_s ⇒ Object
- #valid? ⇒ Boolean
Constructor Details
#initialize(line) ⇒ Session
Returns a new instance of Session.
5 6 7 8 9 |
# File 'app/selections/session.rb', line 5 def initialize(line) line.match(regex) do |m| @id = m[1] end end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'app/selections/session.rb', line 3 def id @id end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'app/selections/session.rb', line 15 def to_s @id.to_s end |
#valid? ⇒ Boolean
11 12 13 |
# File 'app/selections/session.rb', line 11 def valid? true end |