Class: Pipewrench::Options
- Inherits:
-
Object
- Object
- Pipewrench::Options
- Defined in:
- lib/pipewrench/options.rb
Instance Attribute Summary collapse
-
#compact ⇒ Object
readonly
Returns the value of attribute compact.
-
#map ⇒ Object
readonly
Returns the value of attribute map.
-
#rails ⇒ Object
readonly
Returns the value of attribute rails.
-
#strip ⇒ Object
readonly
Returns the value of attribute strip.
Instance Method Summary collapse
Instance Attribute Details
#compact ⇒ Object (readonly)
Returns the value of attribute compact.
6 7 8 |
# File 'lib/pipewrench/options.rb', line 6 def compact @compact end |
#map ⇒ Object (readonly)
Returns the value of attribute map.
6 7 8 |
# File 'lib/pipewrench/options.rb', line 6 def map @map end |
#rails ⇒ Object (readonly)
Returns the value of attribute rails.
6 7 8 |
# File 'lib/pipewrench/options.rb', line 6 def rails @rails end |
#strip ⇒ Object (readonly)
Returns the value of attribute strip.
6 7 8 |
# File 'lib/pipewrench/options.rb', line 6 def strip @strip end |
Instance Method Details
#help ⇒ Object
20 21 22 23 |
# File 'lib/pipewrench/options.rb', line 20 def help puts self exit end |
#parse!(*args) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/pipewrench/options.rb', line 8 def parse!(*args) parser.parse!(*args) self rescue OptionParser::InvalidOption => e puts e help end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/pipewrench/options.rb', line 16 def to_s parser.to_s end |