Class: Yaparc::Char

Inherits:
Object
  • Object
show all
Includes:
Parsable
Defined in:
lib/yaparc.rb

Overview

class Char

Constant Summary

Constants included from Parsable

Parsable::IS_ALPHANUM, Parsable::IS_DIGIT, Parsable::IS_LOWER, Parsable::IS_SPACE, Parsable::IS_WHITESPACE

Instance Attribute Summary

Attributes included from Parsable

#tree

Instance Method Summary collapse

Methods included from Parsable

#eval, included, #parse

Constructor Details

#initialize(char) ⇒ Char

Returns a new instance of Char.



454
455
456
457
458
459
# File 'lib/yaparc.rb', line 454

def initialize(char)
  equal_char = lambda {|i| i == char}
  @parser =  lambda do |input|
    Satisfy.new(equal_char)
  end
end