Class: Nydp::StringFragmentToken

Inherits:
Object
  • Object
show all
Defined in:
lib/nydp/string_token.rb

Direct Known Subclasses

StringFragmentCloseToken

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#repObject

Returns the value of attribute rep.



3
4
5
# File 'lib/nydp/string_token.rb', line 3

def rep
  @rep
end

#stringObject

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_sObject



8
9
10
# File 'lib/nydp/string_token.rb', line 8

def to_s
  rep
end