Method: Typekit::Client#method_missing

Defined in:
lib/typekit/client.rb

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

Rather than making laborious calls to Typekit::Client.kits you can create an instance of the Typekit::Client and call methods on it. Instance methods will be defined for class methods on their first utilization.

Examples:

typekit = Typekit::Client.new('your token here')
typekit.kits    #=> [...]


17
18
19
20
21
22
23
24
25
# File 'lib/typekit/client.rb', line 17

def method_missing(method, *args, &block)
  super unless self.class.respond_to? method
  self.class.class_eval do
    define_method method do |*args, &block|
      self.class.send(method, *args, &block)
    end
  end
  self.class.send(method, *args, &block)
end