Class: Nydp::StringFragmentToken
Direct Known Subclasses
Instance Attribute Summary collapse
-
#rep ⇒ Object
Returns the value of attribute rep.
-
#string ⇒ Object
Returns the value of attribute string.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(string, rep) ⇒ StringFragmentToken
constructor
A new instance of StringFragmentToken.
- #inspect ⇒ Object
- #to_s ⇒ Object
- #to_sym ⇒ Object
Constructor Details
#initialize(string, rep) ⇒ StringFragmentToken
Returns a new instance of StringFragmentToken.
4 5 6 |
# File 'lib/nydp/string_token.rb', line 4 def initialize string, rep @string, @rep = string, rep end |
Instance Attribute Details
#rep ⇒ Object
Returns the value of attribute rep.
3 4 5 |
# File 'lib/nydp/string_token.rb', line 3 def rep @rep end |
#string ⇒ Object
Returns the value of attribute string.
3 4 5 |
# File 'lib/nydp/string_token.rb', line 3 def string @string end |
Instance Method Details
#==(other) ⇒ Object
12 13 14 |
# File 'lib/nydp/string_token.rb', line 12 def == other (self.class == other.class) && (self.string == other.string) end |
#inspect ⇒ Object
9 |
# File 'lib/nydp/string_token.rb', line 9 def inspect ; rep ; end |
#to_s ⇒ Object
8 |
# File 'lib/nydp/string_token.rb', line 8 def to_s ; rep ; end |
#to_sym ⇒ Object
10 |
# File 'lib/nydp/string_token.rb', line 10 def to_sym ; string.to_sym ; end |