Class: AnalyzedToken

Inherits:
Object
  • Object
show all
Defined in:
lib/dcov/analyzed_token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, parent) ⇒ AnalyzedToken

Returns a new instance of AnalyzedToken.



4
5
6
7
# File 'lib/dcov/analyzed_token.rb', line 4

def initialize(name, parent)
  @name = name
  @parent = parent
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



2
3
4
# File 'lib/dcov/analyzed_token.rb', line 2

def name
  @name
end

#parentObject

Returns the value of attribute parent.



2
3
4
# File 'lib/dcov/analyzed_token.rb', line 2

def parent
  @parent
end

Instance Method Details

#==(other) ⇒ Object



9
10
11
# File 'lib/dcov/analyzed_token.rb', line 9

def ==(other)
  (self.name == other.name) && (self.parent == other.parent) 
end