Class: AlgoPlot::Options

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

Constant Summary collapse

SCRIPT =
'algoplot'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Options

Returns a new instance of Options.



10
11
12
13
14
15
# File 'lib/algoplot/options.rb', line 10

def initialize(argv)
  @options = {:n => 100, :functions => [], :output => nil}

  argv = ["-h"] if argv.empty?
  parse_options(argv)
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/algoplot/options.rb', line 6

def options
  @options
end