Class: Musa::GenerativeGrammar::OptionElement
- Defined in:
- lib/musa-dsl/generative/generative-grammar.rb
Overview
Container for generated option elements.
Wraps content and attributes for each element in a generated option. Used internally when generating grammar options.
Instance Attribute Summary collapse
-
#attributes ⇒ Hash
readonly
element attributes.
-
#content ⇒ Object
readonly
element content.
Instance Method Summary collapse
-
#initialize(content, attributes = nil) ⇒ OptionElement
constructor
Creates option element.
Constructor Details
#initialize(content, attributes = nil) ⇒ OptionElement
Creates option element.
169 170 171 172 |
# File 'lib/musa-dsl/generative/generative-grammar.rb', line 169 def initialize(content, attributes = nil) @content = content @attributes = attributes || {} end |
Instance Attribute Details
#attributes ⇒ Hash (readonly)
element attributes
162 163 164 |
# File 'lib/musa-dsl/generative/generative-grammar.rb', line 162 def attributes @attributes end |
#content ⇒ Object (readonly)
element content
162 163 164 |
# File 'lib/musa-dsl/generative/generative-grammar.rb', line 162 def content @content end |