Module: Antlers::PropLexeme
- Extended by:
- PropLexeme
- Includes:
- Lexeme
- Included in:
- PropLexeme
- Defined in:
- lib/lexemes/prop_lexeme.rb
Constant Summary
Constants included from Lexeme
Instance Method Summary collapse
Instance Method Details
#lexeme(name:, props:) ⇒ Object
14 15 16 17 18 |
# File 'lib/lexemes/prop_lexeme.rb', line 14 def lexeme(name:, props:, **) prop = { prop: name } prop[:props] = props(props) unless props.empty? prop end |
#match?(name:) ⇒ Boolean
10 11 12 |
# File 'lib/lexemes/prop_lexeme.rb', line 10 def match?(name:, **) name && [*'A'..'Z'].include?(name[0]) && !(name.start_with?(':') || name.end_with?(':')) end |