Method: Perus::Pinger::Command.option

Defined in:
lib/perus/pinger/command.rb

.option(name, option_settings = {}) ⇒ Object

add an option to the command/metric. both the class and instances of the class have an options method. the class version returns a list of Option objects representing possible options for the command. the object version returns an OpenStruct hash of options and their values (defaults merged with provided values)



57
58
59
60
# File 'lib/perus/pinger/command.rb', line 57

def self.option(name, option_settings = {})
    @options ||= []
    @options << Option.new(name, option_settings, self)
end