class Arpa::Repositories::Resources::Finder

Public Instance Methods

all() click to toggle source
# File lib/arpa/repositories/resources/finder.rb, line 12
def all
  repository_class.all.collect do |record|
    mapper_instance.map_to_entity(record)
  end
end
by_full_name(full_name) click to toggle source
# File lib/arpa/repositories/resources/finder.rb, line 18
def by_full_name(full_name)
  record = repository_class.where(full_name: full_name).first
  mapper_instance.map_to_entity(record) if record
end
find(id) click to toggle source
# File lib/arpa/repositories/resources/finder.rb, line 7
def find(id)
  record = repository_class.find(id)
  mapper_instance.map_to_entity(record)
end
mapper_instance() click to toggle source
# File lib/arpa/repositories/resources/finder.rb, line 23
def mapper_instance
  Arpa::DataMappers::ResourceMapper.instance
end
repository_class() click to toggle source
# File lib/arpa/repositories/resources/finder.rb, line 27
def repository_class
  RepositoryResource
end