Class: Twostroke::Runtime::Types::String
- Defined in:
- lib/twostroke/runtime/types/string.rb
Instance Attribute Summary collapse
-
#string ⇒ Object
readonly
Returns the value of attribute string.
Instance Method Summary collapse
- #===(other) ⇒ Object
-
#initialize(string) ⇒ String
constructor
A new instance of String.
- #to_ruby ⇒ Object
- #typeof ⇒ Object
Methods inherited from Value
Constructor Details
#initialize(string) ⇒ String
Returns a new instance of String.
4 5 6 |
# File 'lib/twostroke/runtime/types/string.rb', line 4 def initialize(string) @string = string end |
Instance Attribute Details
#string ⇒ Object (readonly)
Returns the value of attribute string.
3 4 5 |
# File 'lib/twostroke/runtime/types/string.rb', line 3 def string @string end |
Instance Method Details
#===(other) ⇒ Object
12 13 14 |
# File 'lib/twostroke/runtime/types/string.rb', line 12 def ===(other) other.is_a?(String) && string == other.string end |
#to_ruby ⇒ Object
8 9 10 |
# File 'lib/twostroke/runtime/types/string.rb', line 8 def to_ruby string end |
#typeof ⇒ Object
16 17 18 |
# File 'lib/twostroke/runtime/types/string.rb', line 16 def typeof "string" end |