Module: RestIP::RestAdapter

Included in:
RestIP
Defined in:
lib/rest_ip/rest_adapter.rb

Instance Method Summary collapse

Instance Method Details

#rest_adapterObject



3
4
5
# File 'lib/rest_ip/rest_adapter.rb', line 3

def rest_adapter
  @@rest_adapter
end

#rest_adapter=(name_or_adapter) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/rest_ip/rest_adapter.rb', line 7

def rest_adapter=(name_or_adapter)
  @@rest_adapter =
    case name_or_adapter
    when String, Symbol
      load_adapter name_or_adapter
    when Class
      name_or_adapter
    end
end