Module: WialonApi::Resolver

Included in:
Client, Namespace
Defined in:
lib/wialon_api/resolver.rb

Overview

A mixin for classes that will resolve other classes' objects via #method_missing.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base_class) ⇒ Object

When this module is included, it undefines the :send instance method in the base_class so it can be resolved via method_missing.



27
28
29
30
31
# File 'lib/wialon_api/resolver.rb', line 27

def included(base_class)
  base_class.class_eval do
    undef_method :send
  end
end

Instance Method Details

#resolverHashie::Mash

A Hashie::Mash structure holding the name and sid of current instance.

Returns:

  • (Hashie::Mash)


6
7
8
# File 'lib/wialon_api/resolver.rb', line 6

def resolver
  @resolver ||= Hashie::Mash.new(name: @name, sid: sid)
end