Module: Sequencescape::Api::FinderMethods

Included in:
Associations::HasMany::AssociationProxy, ResourceModelProxy
Defined in:
lib/sequencescape-api/finder_methods.rb

Defined Under Namespace

Modules: Delegation Classes: AllHandler, FindByUuidHandler

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



15
16
17
# File 'lib/sequencescape-api/finder_methods.rb', line 15

def extended(base)
  base.singleton_class.send(:include, Delegation)
end

.included(base) ⇒ Object



19
20
21
# File 'lib/sequencescape-api/finder_methods.rb', line 19

def included(base)
  base.send(:include, Delegation)
end

Instance Method Details

#allObject



58
59
60
# File 'lib/sequencescape-api/finder_methods.rb', line 58

def all
  api.read(actions.read, AllHandler.new(self))
end

#find(uuid) ⇒ Object



39
40
41
# File 'lib/sequencescape-api/finder_methods.rb', line 39

def find(uuid)
  api.read_uuid(uuid, FindByUuidHandler.new(self))
end