Class: KPeg::Dot
Instance Attribute Summary
Attributes inherited from Operator
#action
Instance Method Summary
collapse
Methods inherited from Operator
#detect_tags, #initialize, #inspect_type, #prune_values, #set_action, #|
Constructor Details
This class inherits a constructor from KPeg::Operator
Instance Method Details
#==(obj) ⇒ Object
63
64
65
|
# File 'lib/kpeg/grammar.rb', line 63
def ==(obj)
Dot === obj ? true : false
end
|
#inspect ⇒ Object
67
68
69
|
# File 'lib/kpeg/grammar.rb', line 67
def inspect
"#<dot>"
end
|
#match(x) ⇒ Object
55
56
57
58
59
60
61
|
# File 'lib/kpeg/grammar.rb', line 55
def match(x)
if str = x.get_byte
MatchString.new(self, str)
else
x.fail(self)
end
end
|