class Eancom::Definition

Attributes

block[R]
name[R]
type[R]

Public Class Methods

create(name:, type:, &block) click to toggle source
# File lib/eancom/definition.rb, line 6
def self.create(name:, type:, &block)
  definition = new(name: name, type: type, &block)
  Eancom.register_definition(definition)
end
new(name:, type:, &block) click to toggle source
# File lib/eancom/definition.rb, line 11
def initialize(name:, type:, &block)
  @name = name
  @type = type
  @block = block
end

Public Instance Methods

run(document:, config:) click to toggle source
# File lib/eancom/definition.rb, line 17
def run(document:, config:)
  @block.call(document, config)
end