Module: Tend::Util::Ht::InstanceMethods
- Defined in:
- lib/tend/util/ht.rb
Instance Method Summary collapse
- #delete(options = {}) ⇒ Object
- #get(options = {}) ⇒ Object
- #update(attributes, options = {}) ⇒ Object
Instance Method Details
#delete(options = {}) ⇒ Object
38 39 40 41 42 |
# File 'lib/tend/util/ht.rb', line 38 def delete = {} o = .merge(id: id, no_pagination: true) initialize self.class.send( :handle_response, HTTParty.delete( uri(o), :basic_auth => o.auth ) )[:data] self end |
#get(options = {}) ⇒ Object
50 51 52 |
# File 'lib/tend/util/ht.rb', line 50 def get = {} self.class.get end |
#update(attributes, options = {}) ⇒ Object
44 45 46 47 48 |
# File 'lib/tend/util/ht.rb', line 44 def update attributes, = {} o = .merge(id: id, no_pagination: true) initialize self.class.send( :handle_response, HTTParty.put( uri(o), body: attributes, :basic_auth => o.auth ) )[:data] self end |