Class: Cut::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/cut/client.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(endpoint) ⇒ Client

Returns a new instance of Client.



8
9
10
# File 'lib/cut/client.rb', line 8

def initialize(endpoint)
  @endpoint = endpoint
end

Class Method Details

.get(endpoint) ⇒ Object



4
5
6
# File 'lib/cut/client.rb', line 4

def self.get(endpoint)
  new(endpoint).get
end

Instance Method Details

#getObject



12
13
14
# File 'lib/cut/client.rb', line 12

def get
  Response.new(HTTParty.get(endpoint))
end