Class: Grizzled::Grinc::Parameters

Inherits:
Object
  • Object
show all
Defined in:
lib/grizzled/grinc.rb

Overview


Classes


Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options_hash, argv) ⇒ Parameters

Returns a new instance of Parameters.



65
66
67
68
69
# File 'lib/grizzled/grinc.rb', line 65

def initialize(options_hash, argv)
  @options = options_hash
  @options[:max_nesting] = options_hash[:max_nesting] || DEFAULT_MAX_NEST
  @options[:input_paths] = argv.length == 0 ? nil : argv
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args, &block) ⇒ Object



71
72
73
# File 'lib/grizzled/grinc.rb', line 71

def method_missing(m, *args, &block)
  @options[m]
end

Instance Attribute Details

#input_pathsObject (readonly)

Returns the value of attribute input_paths.



63
64
65
# File 'lib/grizzled/grinc.rb', line 63

def input_paths
  @input_paths
end

#max_nestingObject (readonly)

Returns the value of attribute max_nesting.



63
64
65
# File 'lib/grizzled/grinc.rb', line 63

def max_nesting
  @max_nesting
end

#outputObject (readonly)

Returns the value of attribute output.



63
64
65
# File 'lib/grizzled/grinc.rb', line 63

def output
  @output
end

Instance Method Details

#to_sObject



75
76
77
# File 'lib/grizzled/grinc.rb', line 75

def to_s
  inspect
end