Sha256: 2a041a665f86d3aeab16e7e74bf7936a0a4ba0e0937ad64da35844e956369436

Contents?: true

Size: 561 Bytes

Versions: 1

Compression:

Stored size: 561 Bytes

Contents

module Mavenlink
  module Specificators

    # Specificator is used to inject anything described in specification file into your model.
    class Base
      attr_reader :model_class

      # @param model_class [Class]
      def initialize(model_class)
        @model_class = model_class
      end

      # Injects things described in specification file into the model
      def apply
        raise NotImplementedError
      end

      # @param model_class [Class]
      def self.apply(model_class)
        self.new(model_class).apply
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mavenlink-0.0.1 lib/mavenlink/specificators/base.rb