Top Level Namespace
Defined Under Namespace
Modules: Liebert, Scrapable Classes: AirConditioner, UPS
Instance Method Summary collapse
-
#pass_arguments(object) ⇒ Object
For each argument passed, see if the object responds to a method of that name.
Instance Method Details
#pass_arguments(object) ⇒ Object
For each argument passed, see if the object responds to a method of that name
6 7 8 9 10 11 12 |
# File 'lib/liebert.rb', line 6 def pass_arguments(object) ARGV.each do |arg| sanitized_arg = arg.gsub('--', '') puts object.send(sanitized_arg.to_sym) if object.respond_to? sanitized_arg end puts object.all if ARGV[1].nil? end |