Class: Dawn::App::Drains
- Inherits:
-
Object
- Object
- Dawn::App::Drains
- Includes:
- BaseApi
- Defined in:
- lib/dawn/api/app/drains.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
Instance Method Summary collapse
- #all(options = {}) ⇒ Object
- #create(options = {}) ⇒ Object
- #find(options = {}) ⇒ Object
-
#initialize(app) ⇒ Drains
constructor
A new instance of Drains.
Methods included from BaseApi
Methods included from BaseApi::Extension
Constructor Details
#initialize(app) ⇒ Drains
Returns a new instance of Drains.
12 13 14 |
# File 'lib/dawn/api/app/drains.rb', line 12 def initialize(app) @app = app end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
10 11 12 |
# File 'lib/dawn/api/app/drains.rb', line 10 def app @app end |
Instance Method Details
#all(options = {}) ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/dawn/api/app/drains.rb', line 25 def all(={}) json_request( expects: 200, method: :get, path: "/apps/#{app.id}/drains", query: ).map { |hsh| Drain.new(hsh["drain"]).tap { |d| d.app = @app } } end |