class Generated::Grammar
Attributes
information[RW]
@return [String] information for contributers
name[RW]
@return [String] The name of the grammar
other_properties[RW]
@return [Hash] other properties
patterns[RW]
@return [PatternRule] rules in initial scope
repository[RW]
@return [Hash<String=>Rule>] the repository of rules
scope_name[RW]
@return [String] The grammars scope
version[RW]
@return [String] The version of the grammar
Public Instance Methods
to_h()
click to toggle source
# File lib/ruby_grammar_builder/generated/grammar.rb, line 20 def to_h default = { "name" => @name, "scopeName" => @scope_name, "version" => @version, "information_for_contributors" => @information, "repository" => @repository.transform_values(&:to_h), } other_properties.merge(default).merge(@patterns.to_h) end