Class: Okura::CharType
- Inherits:
-
Object
- Object
- Okura::CharType
- Defined in:
- lib/okura.rb
Instance Attribute Summary collapse
-
#length ⇒ Object
readonly
Returns the value of attribute length.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #accept?(charcode) ⇒ Boolean
- #add(charcode) ⇒ Object
- #group? ⇒ Boolean
-
#initialize(name, invoke, group, length) ⇒ CharType
constructor
A new instance of CharType.
- #invoke? ⇒ Boolean
Constructor Details
#initialize(name, invoke, group, length) ⇒ CharType
Returns a new instance of CharType.
358 359 360 361 |
# File 'lib/okura.rb', line 358 def initialize name,invoke,group,length @name,@invoke,@group,@length=name,invoke,group,length @accept_charcodes={} end |
Instance Attribute Details
#length ⇒ Object (readonly)
Returns the value of attribute length.
366 367 368 |
# File 'lib/okura.rb', line 366 def length @length end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
365 366 367 |
# File 'lib/okura.rb', line 365 def name @name end |
Instance Method Details
#accept?(charcode) ⇒ Boolean
369 370 371 |
# File 'lib/okura.rb', line 369 def accept? charcode @accept_charcodes[charcode] end |
#add(charcode) ⇒ Object
362 363 364 |
# File 'lib/okura.rb', line 362 def add charcode @accept_charcodes[charcode]=true end |
#group? ⇒ Boolean
367 |
# File 'lib/okura.rb', line 367 def group?; @group; end |
#invoke? ⇒ Boolean
368 |
# File 'lib/okura.rb', line 368 def invoke?; @invoke; end |