Class: PalavaMachine::Runner::CliOptions

Inherits:
Struct
  • Object
show all
Defined in:
lib/palava_machine/runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#addressObject

Returns the value of attribute address

Returns:

  • (Object)

    the current value of address



20
21
22
# File 'lib/palava_machine/runner.rb', line 20

def address
  @address
end

#dbObject

Returns the value of attribute db

Returns:

  • (Object)

    the current value of db



20
21
22
# File 'lib/palava_machine/runner.rb', line 20

def db
  @db
end

#mongo_addressObject

Returns the value of attribute mongo_address

Returns:

  • (Object)

    the current value of mongo_address



20
21
22
# File 'lib/palava_machine/runner.rb', line 20

def mongo_address
  @mongo_address
end

#portObject

Returns the value of attribute port

Returns:

  • (Object)

    the current value of port



20
21
22
# File 'lib/palava_machine/runner.rb', line 20

def port
  @port
end

#redis_addressObject

Returns the value of attribute redis_address

Returns:

  • (Object)

    the current value of redis_address



20
21
22
# File 'lib/palava_machine/runner.rb', line 20

def redis_address
  @redis_address
end

#shutdown_timeoutObject

Returns the value of attribute shutdown_timeout

Returns:

  • (Object)

    the current value of shutdown_timeout



20
21
22
# File 'lib/palava_machine/runner.rb', line 20

def shutdown_timeout
  @shutdown_timeout
end