Class: Ru::OptionPrinter
- Inherits:
-
Object
- Object
- Ru::OptionPrinter
- Defined in:
- lib/ru/option_printer.rb
Instance Attribute Summary collapse
-
#options_parser ⇒ Object
Returns the value of attribute options_parser.
Instance Method Summary collapse
- #exists?(option_key) ⇒ Boolean
-
#initialize(options_parser: nil) ⇒ OptionPrinter
constructor
A new instance of OptionPrinter.
- #run(option_key, option_value = nil) ⇒ Object
Constructor Details
#initialize(options_parser: nil) ⇒ OptionPrinter
Returns a new instance of OptionPrinter.
9 10 11 |
# File 'lib/ru/option_printer.rb', line 9 def initialize(options_parser: nil) = end |
Instance Attribute Details
#options_parser ⇒ Object
Returns the value of attribute options_parser.
7 8 9 |
# File 'lib/ru/option_printer.rb', line 7 def end |
Instance Method Details
#exists?(option_key) ⇒ Boolean
13 14 15 |
# File 'lib/ru/option_printer.rb', line 13 def exists?(option_key) ![option_key].to_s.empty? end |
#run(option_key, option_value = nil) ⇒ Object
17 18 19 |
# File 'lib/ru/option_printer.rb', line 17 def run(option_key, option_value=nil) send([option_key], *option_value) end |