Class: Parslet::Pattern::SequenceBind
- Inherits:
-
SubtreeBind
- Object
- Struct
- SubtreeBind
- Parslet::Pattern::SequenceBind
- Defined in:
- lib/parslet/pattern/binding.rb
Overview
Binds a symbol to a sequence of simple leafs ([element1, element2, …])
Instance Attribute Summary
Attributes inherited from SubtreeBind
Instance Method Summary collapse
Methods inherited from SubtreeBind
Instance Method Details
#can_bind?(subtree) ⇒ Boolean
45 46 47 48 |
# File 'lib/parslet/pattern/binding.rb', line 45 def can_bind?(subtree) subtree.kind_of?(Array) && (not subtree.any? { |el| [Hash, Array].include?(el.class) }) end |