Class: Commander

Inherits:
Object
  • Object
show all
Defined in:
lib/etvnet_seek/commander.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCommander

Returns a new instance of Commander.



4
5
6
# File 'lib/etvnet_seek/commander.rb', line 4

def initialize
  @options = parse_options
end

Instance Attribute Details

#modeObject

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_modeObject



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

Returns:

  • (Boolean)


12
13
14
# File 'lib/etvnet_seek/commander.rb', line 12

def runglish_mode?
  @options[:runglish]
end

#search_mode?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/etvnet_seek/commander.rb', line 8

def search_mode?
  @options[:runglish]
end