Class: Myrando::RandoConnection
- Inherits:
-
Object
- Object
- Myrando::RandoConnection
- Includes:
- HTTParty
- Defined in:
- lib/myrando.rb
Instance Method Summary collapse
- #get(path) ⇒ Object
-
#initialize ⇒ RandoConnection
constructor
A new instance of RandoConnection.
- #post(path, body) ⇒ Object
Constructor Details
#initialize ⇒ RandoConnection
Returns a new instance of RandoConnection.
12 13 |
# File 'lib/myrando.rb', line 12 def initialize() end |
Instance Method Details
#get(path) ⇒ Object
15 16 17 18 |
# File 'lib/myrando.rb', line 15 def get(path) opts = { :headers => { 'User-Agent' => "myrando/#{Myrando::VERSION}" } } return self.class.get(path, opts) end |
#post(path, body) ⇒ Object
20 21 22 23 |
# File 'lib/myrando.rb', line 20 def post(path, body) opts = { :body => body, :headers => { 'User-Agent' => "myrando/#{Myrando::VERSION}" } } return self.class.post(path, opts) end |