Class: Plasper::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/Plasper/options.rb

Constant Summary collapse

DEFAULT_ACTION =
'dump'
VALID_ACTIONS =
[DEFAULT_ACTION, 'talk', 'chat']

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Options

Initialize with CLI arguments

Parameters:

  • argv (Array)


13
14
15
16
17
# File 'lib/Plasper/options.rb', line 13

def initialize(argv)
  parse argv
  @action = argv.last
  @action = DEFAULT_ACTION unless VALID_ACTIONS.include? @action
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



5
6
7
# File 'lib/Plasper/options.rb', line 5

def action
  @action
end

#output_fileObject (readonly)

Returns the value of attribute output_file.



5
6
7
# File 'lib/Plasper/options.rb', line 5

def output_file
  @output_file
end

#text_fileObject (readonly)

Returns the value of attribute text_file.



5
6
7
# File 'lib/Plasper/options.rb', line 5

def text_file
  @text_file
end

#weights_fileObject (readonly)

Returns the value of attribute weights_file.



5
6
7
# File 'lib/Plasper/options.rb', line 5

def weights_file
  @weights_file
end