Class: Keisan::Tokens::String
- Inherits:
-
Keisan::Token
- Object
- Keisan::Token
- Keisan::Tokens::String
- Defined in:
- lib/keisan/tokens/string.rb
Constant Summary collapse
- REGEX =
/(\"[^\"]*\"|\'[^\']*\')/
Instance Attribute Summary
Attributes inherited from Keisan::Token
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Keisan::Token
#initialize, #regex, #type, type
Constructor Details
This class inherits a constructor from Keisan::Token
Class Method Details
.regex ⇒ Object
6 7 8 |
# File 'lib/keisan/tokens/string.rb', line 6 def self.regex REGEX end |
Instance Method Details
#value ⇒ Object
10 11 12 |
# File 'lib/keisan/tokens/string.rb', line 10 def value string[1...-1] end |