Class: Noveku::Core
- Inherits:
-
Object
- Object
- Noveku::Core
- Defined in:
- lib/noveku/core.rb
Overview
Common functionnality
Constant Summary
Constants included from Mongo
Mongo::MONGOHQ_KEY, Mongo::MONGOLAB_KEY
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
Instance Method Summary collapse
-
#call ⇒ Object
Run the commands.
-
#initialize(*arguments) ⇒ Core
constructor
Keep track of the given commands.
Methods included from Mongo
#mongo_dump, #mongodump_cmd, #mongohq_dump_cmd, #mongolab_dump_cmd
Methods included from Tail
Methods included from Proxy
#method_missing, #proxy_cmd_str, #respond_to_missing?
Methods included from Migrate
#migrate_cmd, #migrate_cmd_args
Methods included from Console
#console_cmd, #console_cmd_str
Methods included from Rake
Methods included from Config
#config_value_for, #config_value_str
Constructor Details
#initialize(*arguments) ⇒ Core
Keep track of the given commands
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/noveku/core.rb', line 27 def initialize(*arguments) @environment = arguments.shift ensure_env ensure_heroku_app @command = arguments.shift @arguments = arguments rescue Exception => e handle_exception(e) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Noveku::Proxy
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
24 25 26 |
# File 'lib/noveku/core.rb', line 24 def arguments @arguments end |
#command ⇒ Object (readonly)
Returns the value of attribute command.
24 25 26 |
# File 'lib/noveku/core.rb', line 24 def command @command end |
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
24 25 26 |
# File 'lib/noveku/core.rb', line 24 def environment @environment end |
Instance Method Details
#call ⇒ Object
Run the commands
40 41 42 |
# File 'lib/noveku/core.rb', line 40 def call send "#{@command}_cmd" end |