Class: HonestRenter::Post
- Inherits:
-
Object
- Object
- HonestRenter::Post
- Defined in:
- lib/requests/post.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(resource_name, body, session = nil) ⇒ Post
constructor
A new instance of Post.
Constructor Details
#initialize(resource_name, body, session = nil) ⇒ Post
Returns a new instance of Post.
3 4 5 6 7 |
# File 'lib/requests/post.rb', line 3 def initialize(resource_name, body, session=nil) @resource_name = resource_name @body = body @session = session end |
Instance Method Details
#call ⇒ Object
9 10 11 12 13 |
# File 'lib/requests/post.rb', line 9 def call client = HonestRenter::Client.new request = HonestRenter::Request.new(client, @session) request.post(@resource_name, @body) end |