Class: Rubycop::Analyzer::Ruby::Assoc

Inherits:
Node
  • Object
show all
Defined in:
lib/rubycop/analyzer/ruby/assoc.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#accept

Constructor Details

#initialize(key, value) ⇒ Assoc

Returns a new instance of Assoc.



5
6
7
8
# File 'lib/rubycop/analyzer/ruby/assoc.rb', line 5

def initialize(key, value)
  @key = key
  @value = value
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



10
11
12
# File 'lib/rubycop/analyzer/ruby/assoc.rb', line 10

def key
  @key
end

#valueObject (readonly)

Returns the value of attribute value.



11
12
13
# File 'lib/rubycop/analyzer/ruby/assoc.rb', line 11

def value
  @value
end