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
29 30 31 |
# File 'lib/stupidedi/builder/tokenization.rb', line 29 def blank [:blank, nil, Reader::Position.caller(2)] end |
#composite(*components) ⇒ void
This method returns an undefined value.
Generates a composite element
19 20 21 |
# File 'lib/stupidedi/builder/tokenization.rb', line 19 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.
51 52 53 |
# File 'lib/stupidedi/builder/tokenization.rb', line 51 def default [:default, nil, Reader::Position.caller(2)] end |