Class: Escobar::Heroku::Slug
- Inherits:
-
Object
- Object
- Escobar::Heroku::Slug
- Defined in:
- lib/escobar/heroku/slug.rb
Overview
Class representing a heroku slug
Instance Attribute Summary collapse
-
#app_id ⇒ Object
readonly
Returns the value of attribute app_id.
-
#app_name ⇒ Object
readonly
Returns the value of attribute app_name.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#sha ⇒ Object
Returns the value of attribute sha.
Instance Method Summary collapse
- #info ⇒ Object
-
#initialize(client, app_id, id) ⇒ Slug
constructor
A new instance of Slug.
- #ref ⇒ Object
Constructor Details
#initialize(client, app_id, id) ⇒ Slug
Returns a new instance of Slug.
9 10 11 12 13 |
# File 'lib/escobar/heroku/slug.rb', line 9 def initialize(client, app_id, id) @id = id @app_id = app_id @client = client end |
Instance Attribute Details
#app_id ⇒ Object (readonly)
Returns the value of attribute app_id.
5 6 7 |
# File 'lib/escobar/heroku/slug.rb', line 5 def app_id @app_id end |
#app_name ⇒ Object (readonly)
Returns the value of attribute app_name.
5 6 7 |
# File 'lib/escobar/heroku/slug.rb', line 5 def app_name @app_name end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'lib/escobar/heroku/slug.rb', line 5 def client @client end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/escobar/heroku/slug.rb', line 5 def id @id end |
#sha ⇒ Object
Returns the value of attribute sha.
7 8 9 |
# File 'lib/escobar/heroku/slug.rb', line 7 def sha @sha end |
Instance Method Details
#info ⇒ Object
15 16 17 |
# File 'lib/escobar/heroku/slug.rb', line 15 def info @info ||= client.heroku.get("/apps/#{app_id}/slugs/#{id}") end |
#ref ⇒ Object
19 20 21 |
# File 'lib/escobar/heroku/slug.rb', line 19 def ref info["commit"] end |