Sha256: 477a8b7e491899a45b6321d789b22253f10e8042c9193a6503f27d67cda4d255

Contents?: true

Size: 418 Bytes

Versions: 16

Compression:

Stored size: 418 Bytes

Contents

module Eancom
  class Definition

    attr_reader :name, :type, :block

    def self.create(name:, type:, &block)
      definition = new(name: name, type: type, &block)
      Eancom.register_definition(definition)
    end

    def initialize(name:, type:, &block)
      @name = name
      @type = type
      @block = block
    end

    def run(document:, config:)
      @block.call(document, config)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
eancom-1.6.3 lib/eancom/definition.rb
eancom-1.6.2 lib/eancom/definition.rb
eancom-1.6.0 lib/eancom/definition.rb
eancom-1.5.7 lib/eancom/definition.rb
eancom-1.5.6 lib/eancom/definition.rb
eancom-1.5.5 lib/eancom/definition.rb
eancom-1.5.4 lib/eancom/definition.rb
eancom-1.5.2 lib/eancom/definition.rb
eancom-1.5.1 lib/eancom/definition.rb
eancom-1.5.0 lib/eancom/definition.rb
eancom-1.4.0 lib/eancom/definition.rb
eancom-1.3.0 lib/eancom/definition.rb
eancom-1.2.0 lib/eancom/definition.rb
eancom-1.1.1 lib/eancom/definition.rb
eancom-1.1.0 lib/eancom/definition.rb
eancom-2.0.0 lib/eancom/definition.rb