Class: Dawn::App::Env
- Inherits:
-
Hash
- Object
- Hash
- Dawn::App::Env
- Includes:
- BaseApi
- Defined in:
- lib/dawn/api/app/env.rb
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::Extension
Constructor Details
#initialize(app, data) ⇒ Env
Returns a new instance of Env.
11 12 13 14 15 |
# File 'lib/dawn/api/app/env.rb', line 11 def initialize(app, data) @app = app super() replace(data) end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
9 10 11 |
# File 'lib/dawn/api/app/env.rb', line 9 def app @app end |
Instance Method Details
#refresh(options = {}) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/dawn/api/app/env.rb', line 17 def refresh(={}) replace json_request( expects: 200, method: :get, path: "/apps/#{app.id}/env", query: )["env"] end |
#save(options = {}) ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/dawn/api/app/env.rb', line 26 def save(={}) replace json_request( expects: 200, method: :post, path: "/apps/#{app.id}/env", body: { env: merge() }.to_json )["env"] end |