Sha256: 909c8a3c9ac2ffb0564baf549119658430e2eee116749b79c06d2cfcf0d5029b

Contents?: true

Size: 729 Bytes

Versions: 2

Compression:

Stored size: 729 Bytes

Contents

# coding: utf-8

require 'fig/deparser'
require 'fig/deparser/v1_base'

module Fig; end
module Fig::Deparser; end

# Handles serializing of statements in the v1 grammar.
class Fig::Deparser::V1
  include Fig::Deparser
  include Fig::Deparser::V1Base

  def initialize(
    emit_as_input_or_to_be_published_values,
    indent_string = ' ' * 2,
    initial_indent_level = 0
  )
    @emit_as_input_or_to_be_published_values =
      emit_as_input_or_to_be_published_values
    @indent_string        = indent_string
    @initial_indent_level = initial_indent_level

    return
  end

  def grammar_version(statement)
    add_indent

    @text << "grammar v1\n"

    return
  end

  def grammar_description()
    return 'v1'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fig-1.24.0 lib/fig/deparser/v1.rb
fig-1.23.1.beta.1 lib/fig/deparser/v1.rb