Class: Restify::Relation
- Inherits:
-
Object
- Object
- Restify::Relation
- Defined in:
- lib/restify/relation.rb
Instance Method Summary collapse
- #get(opts = {}) ⇒ Object
-
#initialize(client, uri_template) ⇒ Relation
constructor
A new instance of Relation.
- #post(opts = {}) ⇒ Object
Constructor Details
#initialize(client, uri_template) ⇒ Relation
Returns a new instance of Relation.
4 5 6 7 8 9 10 11 |
# File 'lib/restify/relation.rb', line 4 def initialize(client, uri_template) @client = client @template = if uri_template.is_a?(Addressable::Template) uri_template else Addressable::Template.new(uri_template) end end |
Instance Method Details
#get(opts = {}) ⇒ Object
13 14 15 |
# File 'lib/restify/relation.rb', line 13 def get(opts = {}) request :get, opts end |
#post(opts = {}) ⇒ Object
17 18 19 |
# File 'lib/restify/relation.rb', line 17 def post(opts = {}) request :post, opts end |