Sha256: 37fea96cf187f48f4c0a6b5e86066324e0a75b30a81965baf7d81f20095a89f6

Contents?: true

Size: 848 Bytes

Versions: 10

Compression:

Stored size: 848 Bytes

Contents

# -*- encoding : utf-8 -*-
module RademadeAdmin
  module Model
    class Info
      class Relations

        #@param data_adapter [RademadeAdmin::Model::Adapter::Data]
        #
        def initialize(data_adapter)
          @data_adapter = data_adapter
        end

        # Return array of RademadeAdmin::Model::Info::Relation
        #
        # @return [Array]
        #
        def all
          @data_adapter.relations
        end

        # Return status of relation availability
        #
        # @param name [String]
        # @return [Bool]
        #
        def exist?(name)
          @data_adapter.has_relation? name
        end

        # @param name [String]
        # @return [RademadeAdmin::Model::Info::Relation]
        #
        def relation(name)
          @data_adapter.relation name
        end

      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rademade_admin-0.2.2 lib/rademade_admin/model/info/relations.rb
rademade_admin-0.2.1 lib/rademade_admin/model/info/relations.rb
rademade_admin-0.2.0 lib/rademade_admin/model/info/relations.rb
rademade_admin-0.1.6 lib/rademade_admin/model/info/relations.rb
rademade_admin-0.1.5 lib/rademade_admin/model/info/relations.rb
rademade_admin-0.1.4 lib/rademade_admin/model/info/relations.rb
rademade_admin-0.1.3 lib/rademade_admin/model/info/relations.rb
rademade_admin-0.1.2 lib/rademade_admin/model/info/relations.rb
rademade_admin-0.1.1 lib/rademade_admin/model/info/relations.rb
rademade_admin-0.1.0 lib/rademade_admin/model/info/relations.rb