Class: Dawn::Gear
- Inherits:
-
Object
- Object
- Dawn::Gear
- Includes:
- BaseApi
- Defined in:
- lib/dawn/api/models/gear.rb
Overview
:nodoc:
Instance Attribute Summary collapse
Class Method Summary collapse
Instance Method Summary collapse
- #destroy(options = {}) ⇒ Object
-
#initialize(data) ⇒ Gear
constructor
A new instance of Gear.
- #refresh ⇒ Object
- #restart(options = {}) ⇒ Object
Methods included from BaseApi
Methods included from BaseApi::RequestExtension
Methods included from SafeExtension
Constructor Details
#initialize(data) ⇒ Gear
Returns a new instance of Gear.
29 30 31 32 |
# File 'lib/dawn/api/models/gear.rb', line 29 def initialize(data) @app = nil @data = data end |
Instance Attribute Details
Class Method Details
.destroy(options) ⇒ Object
90 91 92 93 94 95 96 97 |
# File 'lib/dawn/api/models/gear.rb', line 90 def self.destroy() id = id_param() delete( path: "/gears/#{id}", query: ) end |
.find(options) ⇒ Object
66 67 68 69 70 71 72 73 |
# File 'lib/dawn/api/models/gear.rb', line 66 def self.find() id = id_param() new get( path: "/gears/#{id}", query: )["gear"] end |
.restart(options) ⇒ Object
78 79 80 81 82 83 84 85 |
# File 'lib/dawn/api/models/gear.rb', line 78 def self.restart() id = id_param() post( path: "/gears/#{id}/restart", query: ) end |
Instance Method Details
#destroy(options = {}) ⇒ Object
59 60 61 |
# File 'lib/dawn/api/models/gear.rb', line 59 def destroy(={}) self.class.destroy(.merge(id: id)) end |
#refresh ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/dawn/api/models/gear.rb', line 41 def refresh @data = get( path: "/gears/#{id}", query: )["gear"] self end |
#restart(options = {}) ⇒ Object
52 53 54 |
# File 'lib/dawn/api/models/gear.rb', line 52 def restart(={}) self.class.restart(.merge(id: id)) end |