Sha256: b618e09e4dcc6c350d96782f9503fd8d4ef6511192f9db8b9ec3990074013ea1

Contents?: true

Size: 577 Bytes

Versions: 9

Compression:

Stored size: 577 Bytes

Contents

module Arpa
  module Repositories
    module Profiles
      class Finder
        include Arpa::Repositories::Base

        def find(id)
          record = repository_class.find(id)
          mapper_instance.map_to_entity(record)
        end

        def all
          repository_class.all.collect do |record|
            mapper_instance.map_to_entity(record)
          end
        end

        def mapper_instance
          Arpa::DataMappers::ProfileMapper.instance
        end

        def repository_class
          RepositoryProfile
        end

      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
arpa-0.1.0 lib/arpa/repositories/profiles/finder.rb
arpa-0.0.9 lib/arpa/repositories/profiles/finder.rb
arpa-0.0.8 lib/arpa/repositories/profiles/finder.rb
arpa-0.0.7 lib/arpa/repositories/profiles/finder.rb
arpa-0.0.6 lib/arpa/repositories/profiles/finder.rb
arpa-0.0.5 lib/arpa/repositories/profiles/finder.rb
arpa-0.0.4 lib/arpa/repositories/profiles/finder.rb
arpa-0.0.3 lib/arpa/repositories/profiles/finder.rb
arpa-0.0.2 lib/arpa/repositories/profiles/finder.rb