Class: Tinder::Connection

Inherits:
Object
  • Object
show all
Defined in:
lib/tinder/connection.rb

Instance Method Summary collapse

Constructor Details

#initializeConnection

Returns a new instance of Connection.



5
6
7
8
9
10
11
# File 'lib/tinder/connection.rb', line 5

def initialize
  class << self
    include HTTParty

    headers 'Content-Type' => 'application/json'
  end
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args, &block) ⇒ Object



17
18
19
# File 'lib/tinder/connection.rb', line 17

def method_missing(*args, &block)
  metaclass.send(*args, &block)
end

Instance Method Details

#metaclassObject



13
14
15
# File 'lib/tinder/connection.rb', line 13

def metaclass
  class << self; self; end
end