Module: CodeBreaker::Parsable::Ranges
Instance Method Summary collapse
-
#parse_erange_node(node) ⇒ Object
exclusive range a…b, a…, …b.
-
#parse_irange_node(node) ⇒ Object
inclusive range a..b, a.., ..b.
Methods included from Node
#method_missing, #not_implemented_message, #parse, #parse_as_hash, #parse_as_last_child_hash, #parse_as_node_type, #parse_children
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class CodeBreaker::Parsable::Node
Instance Method Details
#parse_erange_node(node) ⇒ Object
exclusive range a…b, a…, …b
12 13 14 |
# File 'lib/code_breaker/parsable/ranges.rb', line 12 def parse_erange_node(node) { node.type => parse_children(node, compact: false) } end |
#parse_irange_node(node) ⇒ Object
inclusive range a..b, a.., ..b
7 8 9 |
# File 'lib/code_breaker/parsable/ranges.rb', line 7 def parse_irange_node(node) { node.type => parse_children(node, compact: false) } end |