Class: Dawn::App::Env
- Inherits:
-
Hash
- Object
- Hash
- Dawn::App::Env
- Includes:
- BaseApi
- Defined in:
- lib/dawn/api/models/app/env.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
Instance Method Summary collapse
-
#initialize(app, data) ⇒ Env
constructor
A new instance of Env.
- #refresh(options = {}) ⇒ Object
- #save(options = {}) ⇒ Object
Methods included from BaseApi
Methods included from BaseApi::RequestExtension
Methods included from SafeExtension
Constructor Details
#initialize(app, data) ⇒ Env
Returns a new instance of Env.
20 21 22 23 24 |
# File 'lib/dawn/api/models/app/env.rb', line 20 def initialize(app, data) @app = app super() replace(data) end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
14 15 16 |
# File 'lib/dawn/api/models/app/env.rb', line 14 def app @app end |
Instance Method Details
#refresh(options = {}) ⇒ Object
29 30 31 32 33 34 |
# File 'lib/dawn/api/models/app/env.rb', line 29 def refresh(={}) replace get( path: "/apps/#{app.id}/env", query: )["env"] end |
#save(options = {}) ⇒ Object
39 40 41 42 43 44 |
# File 'lib/dawn/api/models/app/env.rb', line 39 def save(={}) replace post( path: "/apps/#{app.id}/env", body: { app: { env: merge() } }.to_json )["env"] end |