Class: RubyCop::Ruby::Assoc

Inherits:
Node
  • Object
show all
Defined in:
lib/ruby_cop/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.



4
5
6
7
# File 'lib/ruby_cop/ruby/assoc.rb', line 4

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

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



9
10
11
# File 'lib/ruby_cop/ruby/assoc.rb', line 9

def key
  @key
end

#valueObject (readonly)

Returns the value of attribute value.



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

def value
  @value
end