Module: LazyAnt::DSL::Endpoint::ClassMethods
- Defined in:
- lib/lazy_ant/dsl/endpoint.rb
Instance Method Summary collapse
Instance Method Details
#api(name, options = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/lazy_ant/dsl/endpoint.rb', line 12 def api(name, = {}) method, path = endpoint() converter = entity_converter() define_method name do |*args| params = args. path = generate_url(path, args) response = connection.send(method, path, params) converter.call(response.body) end end |