Class: Tumblr::Account

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

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Account

Returns a new instance of Account.



46
47
48
49
# File 'lib/tumblr.rb', line 46

def initialize options = {}
  options.each{|k,v| send k, v}
  httpclient.debug_dev = debug if debug?
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *a, &b) ⇒ Object



59
60
61
62
# File 'lib/tumblr.rb', line 59

def method_missing m, *a, &b
  super unless api.respond_to? m
  api.send m, *a, &b
end

Instance Method Details

#optionsObject



51
52
53
54
55
56
57
# File 'lib/tumblr.rb', line 51

def options
  {
    'email' => email,
    'password' => password,
    'generator' => generator,
  }
end