Class: RabbitFeed::Client
- Inherits:
-
Object
- Object
- RabbitFeed::Client
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/rabbit_feed/client.rb
Constant Summary collapse
- DEFAULTS =
{ payload: 'test', require_path: '.', config_file: 'config/rabbit_feed.yml', logfile: 'log/rabbit_feed.log', pidfile: 'tmp/pids/rabbit_feed.pid' }.freeze
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(arguments = ARGV) ⇒ Client
constructor
A new instance of Client.
- #run ⇒ Object
Constructor Details
#initialize(arguments = ARGV) ⇒ Client
Returns a new instance of Client.
26 27 28 29 30 31 32 33 34 |
# File 'lib/rabbit_feed/client.rb', line 26 def initialize(arguments = ARGV) @command = arguments[0] @options = arguments return if shutdown? validate! set_logging set_configuration load_dependancies unless console? end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
17 18 19 |
# File 'lib/rabbit_feed/client.rb', line 17 def command @command end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
17 18 19 |
# File 'lib/rabbit_feed/client.rb', line 17 def @options end |
Instance Method Details
#run ⇒ Object
36 37 38 |
# File 'lib/rabbit_feed/client.rb', line 36 def run send(command) end |