Class: Cut::Client
- Inherits:
-
Object
- Object
- Cut::Client
- Defined in:
- lib/cut/client.rb
Class Method Summary collapse
Instance Method Summary collapse
- #get ⇒ Object
-
#initialize(endpoint, parameters = {}) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(endpoint, parameters = {}) ⇒ Client
Returns a new instance of Client.
8 9 10 11 12 |
# File 'lib/cut/client.rb', line 8 def initialize(endpoint, parameters = {}) @endpoint = parameters.inject(endpoint) do |str, param| str.gsub("{{#{param.first}}}", CGI.escape(param.last)) end end |
Class Method Details
.get(*args) ⇒ Object
4 5 6 |
# File 'lib/cut/client.rb', line 4 def self.get(*args) new(*args).get end |