Class: Waffle::Maker::Filter
- Inherits:
-
Object
- Object
- Waffle::Maker::Filter
- Defined in:
- lib/waffle/maker.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(argv) ⇒ Filter
constructor
A new instance of Filter.
Constructor Details
#initialize(argv) ⇒ Filter
Returns a new instance of Filter.
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/waffle/maker.rb', line 30 def initialize(argv) (@options = Waffle::Maker::Config.).tap do || OptionParser.new { |o| o. = "Usage: #{$0}" o.on("-f number", "Column number that contains the rails path") { |v| [:f] << v.to_i } o.on("-w number", "Column number that contains the waf path") { |v| [:w] << v.to_i } o.on("--silent-error", "Hide parsing errors, default is false") { |v| [:silent_error] << v } }.parse!(argv) end end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
22 23 24 |
# File 'lib/waffle/maker.rb', line 22 def @options end |