Class: Wemote::Client
- Inherits:
-
Object
- Object
- Wemote::Client
- Defined in:
- lib/wemote/client.rb
Defined Under Namespace
Modules: Manticore, NetHTTP, SmartLib, Typhoeus
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize ⇒ Client
Returns a new instance of Client.
74 75 76 |
# File 'lib/wemote/client.rb', line 74 def initialize extend Wemote::Client.technique end |
Class Method Details
.technique ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/wemote/client.rb', line 4 def self.technique @technique ||= begin constants.collect {|const_name| const_get(const_name)}.select {|const| const.class == Module}.detect do |mod| fulfilled = false begin next unless mod.const_defined?(:DEPENDENCIES) mod.const_get(:DEPENDENCIES).map{|d|require d} fulfilled = true rescue LoadError end fulfilled end end end |