Class: Bling::API::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/bling/api/request.rb

Direct Known Subclasses

Order, Product, User

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object (private)



43
44
45
46
47
48
49
# File 'lib/bling/api/request.rb', line 43

def method_missing(method, *args, &block)
  if method.to_s =~/\A.+_template\z/
    IO.read(File.join(File.dirname(__FILE__), "templates", method.to_s))
  else
    super(method, args, &block)
  end
end