Class: Nydp::StringFragmentToken
- Inherits:
-
Object
- Object
- Nydp::StringFragmentToken
- Defined in:
- lib/nydp/string_token.rb
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.
- #to_s ⇒ 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 |
#to_s ⇒ Object
8 9 10 |
# File 'lib/nydp/string_token.rb', line 8 def to_s rep end |