Sha256: a5b023a1b69195e6f9b025e28b08c30ef8b8555bbb428dfa43612650509aafcf

Contents?: true

Size: 554 Bytes

Versions: 2

Compression:

Stored size: 554 Bytes

Contents

# frozen_string_literal: true

module Clowne
  module Declarations
    class ExcludeAssociation # :nodoc: all
      attr_accessor :name

      def initialize(name)
        @name = name.to_sym
      end

      def compile(plan)
        plan.remove_from(:association, name)
      end
    end
  end
end

Clowne::Declarations.add :exclude_association, Clowne::Declarations::ExcludeAssociation
Clowne::Declarations.add :exclude_associations do |*names|
  names.each do |name|
    declarations.push Clowne::Declarations::ExcludeAssociation.new(name)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
clowne-0.1.0 lib/clowne/declarations/exclude_association.rb
clowne-0.1.0.beta1 lib/clowne/declarations/exclude_association.rb