Class: ActiveResource::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/superdupe/active_resource_extensions.rb

Class Method Summary collapse

Class Method Details

.find(*arguments) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/superdupe/active_resource_extensions.rb', line 20

def find(*arguments)
  scope = arguments.slice!(0)
  options = arguments.slice!(0) || {}

  case scope
    when :all then find_every(options)
    when :first then find_every(options).first
    when :last then find_every(options).last
    when :one then find_one(options)
    else find_single(scope, options)
  end
end

.password=(password) ⇒ Object

Overwrite the configuration of ActiveResource authentication (self.password). Don’t need it for mocking.



16
17
# File 'lib/superdupe/active_resource_extensions.rb', line 16

def password=(password)
end

.user=(user) ⇒ Object

Overwrite the configuration of ActiveResource authentication (self.user). Don’t need it for mocking.



12
13
# File 'lib/superdupe/active_resource_extensions.rb', line 12

def user=(user)
end