Sha256: db1f72c3150bd47179086451c1f722d6ee255c9bd153b47652e4fd89ea2bdd4d

Contents?: true

Size: 465 Bytes

Versions: 8

Compression:

Stored size: 465 Bytes

Contents

# frozen_string_literal: true

module Stepmod
  module Utils
    module Converters
      class Schema < ReverseAdoc::Converters::Base
        def convert(node, state = {})
          state = state.merge(schema_name: node['name'])
          <<~TEMPLATE
            (*"#{node['name']}"
            #{treat_children(node, state).strip}
            *)
          TEMPLATE
        end
      end
      ReverseAdoc::Converters.register :schema, Schema.new
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
stepmod-utils-0.3.5 lib/stepmod/utils/converters/schema.rb
stepmod-utils-0.3.4 lib/stepmod/utils/converters/schema.rb
stepmod-utils-0.3.2 lib/stepmod/utils/converters/schema.rb
stepmod-utils-0.3.1 lib/stepmod/utils/converters/schema.rb
stepmod-utils-0.3.0 lib/stepmod/utils/converters/schema.rb
stepmod-utils-0.2.7 lib/stepmod/utils/converters/schema.rb
stepmod-utils-0.2.6 lib/stepmod/utils/converters/schema.rb
stepmod-utils-0.2.5 lib/stepmod/utils/converters/schema.rb