Class: Timepad::Client
- Inherits:
-
Object
- Object
- Timepad::Client
- Defined in:
- lib/timepad/client.rb
Instance Method Summary collapse
-
#category ⇒ Timepad::Category
Category object.
-
#event ⇒ Timepad::Event
Event object.
- #id ⇒ Object
-
#initialize(attrs = {}) ⇒ Timepad::Client
constructor
Initalize new API.
- #key ⇒ Object
-
#mail ⇒ Timepad::Mail
Return Mail object.
-
#maillist ⇒ Timepad::Maillist
Return Maillist object.
Constructor Details
#initialize(attrs = {}) ⇒ Timepad::Client
Initalize new API
8 9 10 11 12 13 |
# File 'lib/timepad/client.rb', line 8 def initialize(attrs = {}) attrs = Timepad..merge(attrs) Config::VALID_OPTIONS_KEYS.each do |key| instance_variable_set("@#{key}".to_sym, attrs[key]) end end |
Instance Method Details
#category ⇒ Timepad::Category
Category object
32 33 34 |
# File 'lib/timepad/client.rb', line 32 def category @category ||= Timepad::Category.new(self) end |
#event ⇒ Timepad::Event
Event object
39 40 41 |
# File 'lib/timepad/client.rb', line 39 def event @event ||= Timepad::Event.new(self) end |
#id ⇒ Object
47 48 49 |
# File 'lib/timepad/client.rb', line 47 def id @id end |
#key ⇒ Object
43 44 45 |
# File 'lib/timepad/client.rb', line 43 def key @key end |
#mail ⇒ Timepad::Mail
Return Mail object
25 26 27 |
# File 'lib/timepad/client.rb', line 25 def mail @mail ||= Timepad::Mail.new(self) end |
#maillist ⇒ Timepad::Maillist
Return Maillist object
18 19 20 |
# File 'lib/timepad/client.rb', line 18 def maillist @maillist ||= Timepad::Maillist.new(self) end |