Class: LLT::Token::Punctuation
- Inherits:
-
LLT::Token
- Object
- LLT::Token
- LLT::Token::Punctuation
- Defined in:
- lib/llt/token/punctuation.rb
Instance Attribute Summary collapse
-
#closing ⇒ Object
Returns the value of attribute closing.
-
#opening ⇒ Object
Returns the value of attribute opening.
-
#other ⇒ Object
Returns the value of attribute other.
Attributes inherited from LLT::Token
Instance Method Summary collapse
-
#empty? ⇒ Boolean
(also: #no_forms?)
cannot hold anything atm, is therefore never really empty.
-
#initialize(string, id = nil) ⇒ Punctuation
constructor
A new instance of Punctuation.
- #inspect ⇒ Object
- #punctuation ⇒ Object
- #set_functions ⇒ Object
Methods inherited from LLT::Token
#add_form, #add_forms, #has_special_role?, #set_special_role, #use
Constructor Details
#initialize(string, id = nil) ⇒ Punctuation
Returns a new instance of Punctuation.
8 9 10 11 12 13 14 15 |
# File 'lib/llt/token/punctuation.rb', line 8 def initialize(string, id = nil) super # this is part of an old interface that is mostly unused # some parts remain - find and delete em @opening = false @closing = false @other = false end |
Instance Attribute Details
#closing ⇒ Object
Returns the value of attribute closing.
6 7 8 |
# File 'lib/llt/token/punctuation.rb', line 6 def closing @closing end |
#opening ⇒ Object
Returns the value of attribute opening.
6 7 8 |
# File 'lib/llt/token/punctuation.rb', line 6 def opening @opening end |
#other ⇒ Object
Returns the value of attribute other.
6 7 8 |
# File 'lib/llt/token/punctuation.rb', line 6 def other @other end |
Instance Method Details
#empty? ⇒ Boolean Also known as: no_forms?
cannot hold anything atm, is therefore never really empty
18 19 20 |
# File 'lib/llt/token/punctuation.rb', line 18 def empty? false end |
#inspect ⇒ Object
31 32 33 |
# File 'lib/llt/token/punctuation.rb', line 31 def inspect "#{"Punctuation token:".yellow} #{@string}" end |
#punctuation ⇒ Object
27 28 29 |
# File 'lib/llt/token/punctuation.rb', line 27 def punctuation @string end |
#set_functions ⇒ Object
23 24 25 |
# File 'lib/llt/token/punctuation.rb', line 23 def set_functions [:punctuation] end |