Class: StackMob::Deployer
- Inherits:
-
Object
- Object
- StackMob::Deployer
- Defined in:
- lib/stackmob/deployer.rb
Constant Summary collapse
- APP_PATH =
"heroku/app"
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
- #fetch ⇒ Object
-
#initialize(cl) ⇒ Deployer
constructor
A new instance of Deployer.
- #register(hostname) ⇒ Object
Constructor Details
#initialize(cl) ⇒ Deployer
Returns a new instance of Deployer.
24 25 26 |
# File 'lib/stackmob/deployer.rb', line 24 def initialize(cl) self.client = cl end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
20 21 22 |
# File 'lib/stackmob/deployer.rb', line 20 def client @client end |
Instance Method Details
#fetch ⇒ Object
32 33 34 |
# File 'lib/stackmob/deployer.rb', line 32 def fetch self.client.request(:get, :api, APP_PATH) end |
#register(hostname) ⇒ Object
28 29 30 |
# File 'lib/stackmob/deployer.rb', line 28 def register(hostname) self.client.request(:post, :api, APP_PATH, :hostname => hostname) end |