Class: UserSelection
- Inherits:
-
Object
- Object
- UserSelection
- Defined in:
- lib/etvnet_seek/user_selection.rb
Instance Attribute Summary collapse
-
#index ⇒ Object
readonly
Returns the value of attribute index.
Instance Method Summary collapse
Instance Attribute Details
#index ⇒ Object (readonly)
Returns the value of attribute index.
2 3 4 |
# File 'lib/etvnet_seek/user_selection.rb', line 2 def index @index end |
Instance Method Details
#blank? ⇒ Boolean
18 19 20 |
# File 'lib/etvnet_seek/user_selection.rb', line 18 def blank? @blank end |
#catalog? ⇒ Boolean
22 23 24 |
# File 'lib/etvnet_seek/user_selection.rb', line 22 def catalog? @catalog end |
#parse(text) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/etvnet_seek/user_selection.rb', line 4 def parse text @blank = text.strip.size == 0 result = text.split @index = result[0].to_i-1 @quit = (result & ['q', 'Q']).empty? ? false : true @catalog = (result & ['c', 'C']).empty? ? false : true end |
#quit? ⇒ Boolean
14 15 16 |
# File 'lib/etvnet_seek/user_selection.rb', line 14 def quit? @quit end |