Class: Commander
- Inherits:
-
Object
- Object
- Commander
- Defined in:
- lib/etvnet_seek/commander.rb
Instance Attribute Summary collapse
-
#mode ⇒ Object
Returns the value of attribute mode.
Instance Method Summary collapse
- #get_initial_mode ⇒ Object
-
#initialize ⇒ Commander
constructor
A new instance of Commander.
- #search_mode? ⇒ Boolean
- #translit_mode? ⇒ Boolean
Constructor Details
#initialize ⇒ Commander
Returns a new instance of Commander.
4 5 6 |
# File 'lib/etvnet_seek/commander.rb', line 4 def initialize @options = end |
Instance Attribute Details
#mode ⇒ Object
Returns the value of attribute mode.
2 3 4 |
# File 'lib/etvnet_seek/commander.rb', line 2 def mode @mode end |
Instance Method Details
#get_initial_mode ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/etvnet_seek/commander.rb', line 16 def get_initial_mode if @options[:search] or @options[:translit] 'search' elsif @options[:best_hundred] 'best_hundred' elsif @options[:top_this_week] 'top_this_week' elsif @options[:channels] 'channels' elsif @options[:catalog] 'catalog' elsif @options[:new_items] 'new_items' elsif @options[:premiere] 'premiere' else 'main' end end |
#search_mode? ⇒ Boolean
8 9 10 |
# File 'lib/etvnet_seek/commander.rb', line 8 def search_mode? @options[:search] end |
#translit_mode? ⇒ Boolean
12 13 14 |
# File 'lib/etvnet_seek/commander.rb', line 12 def translit_mode? @options[:translit] end |