Class: PalavaMachine::Runner::CliOptions
- Inherits:
-
Struct
- Object
- Struct
- PalavaMachine::Runner::CliOptions
- Defined in:
- lib/palava_machine/runner.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#db ⇒ Object
Returns the value of attribute db.
-
#mongo_address ⇒ Object
Returns the value of attribute mongo_address.
-
#port ⇒ Object
Returns the value of attribute port.
-
#redis_address ⇒ Object
Returns the value of attribute redis_address.
-
#shutdown_timeout ⇒ Object
Returns the value of attribute shutdown_timeout.
Instance Method Summary collapse
-
#initialize(*argv) ⇒ CliOptions
constructor
A new instance of CliOptions.
Constructor Details
#initialize(*argv) ⇒ CliOptions
Returns a new instance of CliOptions.
28 29 30 31 32 33 34 35 |
# File 'lib/palava_machine/runner.rb', line 28 def initialize(*argv) self.port = (argv[0] || 4233).to_i self.db = (argv[1] || 0).to_i self.address = argv[2] || "0.0.0.0" self.shutdown_timeout = (argv[3] || 3).to_i self.redis_address = argv[4] || 'localhost:6379' self.mongo_address = argv[5] || 'localhost:27017' end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address
20 21 22 |
# File 'lib/palava_machine/runner.rb', line 20 def address @address end |
#db ⇒ Object
Returns the value of attribute db
20 21 22 |
# File 'lib/palava_machine/runner.rb', line 20 def db @db end |
#mongo_address ⇒ Object
Returns the value of attribute mongo_address
20 21 22 |
# File 'lib/palava_machine/runner.rb', line 20 def mongo_address @mongo_address end |
#port ⇒ Object
Returns the value of attribute port
20 21 22 |
# File 'lib/palava_machine/runner.rb', line 20 def port @port end |
#redis_address ⇒ Object
Returns the value of attribute redis_address
20 21 22 |
# File 'lib/palava_machine/runner.rb', line 20 def redis_address @redis_address end |
#shutdown_timeout ⇒ Object
Returns the value of attribute shutdown_timeout
20 21 22 |
# File 'lib/palava_machine/runner.rb', line 20 def shutdown_timeout @shutdown_timeout end |