Class: Ru::OptionPrinter

Inherits:
Object
  • Object
show all
Defined in:
lib/ru/option_printer.rb

Instance Method Summary collapse

Instance Method Details

#exists?(option_key) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/ru/option_printer.rb', line 6

def exists?(option_key)
  ! (options[option_key].nil? || options[option_key].empty?)
end

#run(option_key, option_value = nil) ⇒ Object



10
11
12
# File 'lib/ru/option_printer.rb', line 10

def run(option_key, option_value=nil)
  send(options[option_key], *option_value)
end