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.
- #runglish_mode? ⇒ Boolean
- #search_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 |
# File 'lib/etvnet_seek/commander.rb', line 16 def get_initial_mode if @options[:search] == true 'search' elsif @options[:best_ten] == true 'best_ten' elsif @options[:popular] == true 'popular' elsif @options[:we_recommend] == true 'we_recommend' elsif @options[:channels] == true 'channels' else 'main' end end |
#runglish_mode? ⇒ Boolean
12 13 14 |
# File 'lib/etvnet_seek/commander.rb', line 12 def runglish_mode? @options[:runglish] end |
#search_mode? ⇒ Boolean
8 9 10 |
# File 'lib/etvnet_seek/commander.rb', line 8 def search_mode? @options[:runglish] end |