Class: Heroku::Model::App
- Inherits:
-
Struct
- Object
- Struct
- Heroku::Model::App
- Includes:
- ModelHelper
- Defined in:
- lib/heroku/model/app.rb
Instance Attribute Summary collapse
-
#archived_at ⇒ Object
Returns the value of attribute archived_at.
-
#buildpack_provided_description ⇒ Object
Returns the value of attribute buildpack_provided_description.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#git_url ⇒ Object
Returns the value of attribute git_url.
-
#id ⇒ Object
Returns the value of attribute id.
-
#maintenance ⇒ Object
Returns the value of attribute maintenance.
-
#name ⇒ Object
Returns the value of attribute name.
-
#owner ⇒ Object
Returns the value of attribute owner.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#region ⇒ Object
Returns the value of attribute region.
-
#released_at ⇒ Object
Returns the value of attribute released_at.
-
#repo_size ⇒ Object
Returns the value of attribute repo_size.
-
#slug_size ⇒ Object
Returns the value of attribute slug_size.
-
#stack ⇒ Object
Returns the value of attribute stack.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#web_url ⇒ Object
Returns the value of attribute web_url.
Instance Method Summary collapse
- #destroy ⇒ Object
- #end_point ⇒ Object
- #identifiable ⇒ Object
-
#initialize(params = {}) ⇒ App
constructor
A new instance of App.
- #inspect ⇒ Object
- #patchable ⇒ Object
- #push(dir) ⇒ Object
- #save ⇒ Object
Methods included from ModelHelper
#identifier, #struct_init_from_hash, #sub_struct_as_hash
Constructor Details
#initialize(params = {}) ⇒ App
Returns a new instance of App.
31 32 33 |
# File 'lib/heroku/model/app.rb', line 31 def initialize(params = {}) super(*struct_init_from_hash(params)) end |
Instance Attribute Details
#archived_at ⇒ Object
Returns the value of attribute archived_at
6 7 8 |
# File 'lib/heroku/model/app.rb', line 6 def archived_at @archived_at end |
#buildpack_provided_description ⇒ Object
Returns the value of attribute buildpack_provided_description
6 7 8 |
# File 'lib/heroku/model/app.rb', line 6 def buildpack_provided_description @buildpack_provided_description end |
#created_at ⇒ Object
Returns the value of attribute created_at
6 7 8 |
# File 'lib/heroku/model/app.rb', line 6 def created_at @created_at end |
#git_url ⇒ Object
Returns the value of attribute git_url
6 7 8 |
# File 'lib/heroku/model/app.rb', line 6 def git_url @git_url end |
#id ⇒ Object
Returns the value of attribute id
6 7 8 |
# File 'lib/heroku/model/app.rb', line 6 def id @id end |
#maintenance ⇒ Object
Returns the value of attribute maintenance
6 7 8 |
# File 'lib/heroku/model/app.rb', line 6 def maintenance @maintenance end |
#name ⇒ Object
Returns the value of attribute name
6 7 8 |
# File 'lib/heroku/model/app.rb', line 6 def name @name end |
#owner ⇒ Object
Returns the value of attribute owner
6 7 8 |
# File 'lib/heroku/model/app.rb', line 6 def owner @owner end |
#parent ⇒ Object
Returns the value of attribute parent
6 7 8 |
# File 'lib/heroku/model/app.rb', line 6 def parent @parent end |
#region ⇒ Object
Returns the value of attribute region
6 7 8 |
# File 'lib/heroku/model/app.rb', line 6 def region @region end |
#released_at ⇒ Object
Returns the value of attribute released_at
6 7 8 |
# File 'lib/heroku/model/app.rb', line 6 def released_at @released_at end |
#repo_size ⇒ Object
Returns the value of attribute repo_size
6 7 8 |
# File 'lib/heroku/model/app.rb', line 6 def repo_size @repo_size end |
#slug_size ⇒ Object
Returns the value of attribute slug_size
6 7 8 |
# File 'lib/heroku/model/app.rb', line 6 def slug_size @slug_size end |
#stack ⇒ Object
Returns the value of attribute stack
6 7 8 |
# File 'lib/heroku/model/app.rb', line 6 def stack @stack end |
#updated_at ⇒ Object
Returns the value of attribute updated_at
6 7 8 |
# File 'lib/heroku/model/app.rb', line 6 def updated_at @updated_at end |
#web_url ⇒ Object
Returns the value of attribute web_url
6 7 8 |
# File 'lib/heroku/model/app.rb', line 6 def web_url @web_url end |
Instance Method Details
#destroy ⇒ Object
65 66 67 |
# File 'lib/heroku/model/app.rb', line 65 def destroy parent.delete_app(self) end |
#end_point ⇒ Object
57 58 59 |
# File 'lib/heroku/model/app.rb', line 57 def end_point "/apps/#{id}" end |
#identifiable ⇒ Object
53 54 55 |
# File 'lib/heroku/model/app.rb', line 53 def identifiable sub_struct_as_hash(:id, :name) end |
#inspect ⇒ Object
27 28 29 |
# File 'lib/heroku/model/app.rb', line 27 def inspect "#<#{self.class.name} #{identifier}>" end |
#patchable ⇒ Object
49 50 51 |
# File 'lib/heroku/model/app.rb', line 49 def patchable sub_struct_as_hash(:maintenance, :name) end |
#push(dir) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/heroku/model/app.rb', line 35 def push(dir) begin Git.open(dir, log: Heroku::Properties.logger).push(git_url) true rescue => e Heroku::Properties.logger.error(e.) e.backtrace.each do |line| Heroku::Properties.logger.error(line) end false end end |
#save ⇒ Object
61 62 63 |
# File 'lib/heroku/model/app.rb', line 61 def save parent.update_app(self) end |