Sha256: ff56126662afd181cacbd33f307b2e4753c05687f459aeef2bb43a279dc58748

Contents?: true

Size: 391 Bytes

Versions: 5

Compression:

Stored size: 391 Bytes

Contents

require 'extensions/hash'

module Moblues
  module DataModel
    class Relationship < Struct.new(:name, :destination_entity, :to_many, :ordered)
      def initialize(params)
        p = params.compact
        super(
          p.fetch(:name),
          p.fetch(:destination_entity),
          p.fetch(:to_many, false),
          p.fetch(:ordered, false)
        )
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
moblues-0.4.0 lib/moblues/data_model/relationship.rb
moblues-0.3.0 lib/moblues/data_model/relationship.rb
moblues-0.2.0 lib/moblues/data_model/relationship.rb
moblues-0.1.0 lib/moblues/data_model/relationship.rb
moblues-0.0.1 lib/moblues/data_model/relationship.rb