Class: Duxml::MetaClass

Inherits:
Object show all
Includes:
Meta
Defined in:
lib/duxml/meta.rb

Overview

all XML files ready by Duxml have a metadata file generated with a modified, matching file name

See Also:

  • #Meta#Meta.meta_path

Constant Summary

Constants included from Meta

Duxml::Meta::FILE_EXT

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Meta

#grammar=, meta_path, #xml

Constructor Details

#initialize(grammar_path = nil) ⇒ MetaClass

Returns a new instance of MetaClass.

Parameters:

  • grammar_path (String) (defaults to: nil)

    optional path of grammar file which can be a spreadsheet or Duxml::Grammar file



19
20
21
22
23
# File 'lib/duxml/meta.rb', line 19

def initialize(grammar_path=nil)
  @history = HistoryClass.new
  self.grammar = grammar_path ? Grammar.import(grammar_path) : GrammarClass.new
  @grammar_path = grammar_path
end

Instance Attribute Details

#grammarObject (readonly)

Returns the value of attribute grammar.



25
26
27
# File 'lib/duxml/meta.rb', line 25

def grammar
  @grammar
end

#grammar_pathObject (readonly)

Returns the value of attribute grammar_path.



25
26
27
# File 'lib/duxml/meta.rb', line 25

def grammar_path
  @grammar_path
end

#historyObject (readonly)

Returns the value of attribute history.



25
26
27
# File 'lib/duxml/meta.rb', line 25

def history
  @history
end