Class: Everlog::Dom::Entity::Config

Inherits:
Everlog::Dom::Entity show all
Defined in:
lib/everlog/dom/entity/config.rb

Constant Summary collapse

THIRD_PARTY =
%w(evernote twitter hatena github moves animetick wunderground googlemap).freeze

Instance Attribute Summary

Attributes inherited from Everlog::Dom::Entity

#id

Class Method Summary collapse

Methods inherited from Everlog::Dom::Entity

#initialize

Constructor Details

This class inherits a constructor from Everlog::Dom::Entity

Class Method Details

.clear!Object



17
18
19
20
21
22
# File 'lib/everlog/dom/entity/config.rb', line 17

def clear!
  THIRD_PARTY.each do |service|
    const_get(service.to_s.capitalize).access_token = nil
    const_get(service.to_s.capitalize).access_secret = nil
  end
end

.method_missing(name) ⇒ Object

Raises:

  • (NoMethodError)


24
25
26
27
# File 'lib/everlog/dom/entity/config.rb', line 24

def method_missing name
  raise NoMethodError, 'specified service is invalid.' unless THIRD_PARTY.include?(name.to_s)
  return const_get(name.to_s.capitalize)
end