Module: Stupidedi::Builder::Tokenization
- Included in:
- BuilderDsl, StateMachine
- Defined in:
- lib/stupidedi/builder/tokenization.rb
Element Constructors collapse
-
#composite(*components) ⇒ void
Generates a composite element.
-
#repeated(*elements) ⇒ void
Generates a repeated element (simple or composite).
Element Placeholders collapse
-
#blank ⇒ void
Generates a blank element.
-
#default ⇒ void
Generates the only possible value an element may have, which may be blank.
-
#not_used ⇒ void
Generates a blank element and asserts that the element’s usage requirement is ‘NOT USED`.
Instance Method Details
#blank ⇒ void
This method returns an undefined value.
Generates a blank element
33 34 35 |
# File 'lib/stupidedi/builder/tokenization.rb', line 33 def blank [:blank, nil, Reader::Position.caller(2)] end |
#composite(*components) ⇒ void
This method returns an undefined value.
Generates a composite element
23 24 25 |
# File 'lib/stupidedi/builder/tokenization.rb', line 23 def composite(*components) [:composite, components, Reader::Position.caller(2)] end |
#default ⇒ void
This method returns an undefined value.
Generates the only possible value an element may have, which may be blank. An exception is thrown if the element’s usage requirement is optional, or if there are more than one allowed non-blank values.
55 56 57 |
# File 'lib/stupidedi/builder/tokenization.rb', line 55 def default [:default, nil, Reader::Position.caller(2)] end |