Class: Atomy::Pattern::InstanceVariable

Inherits:
Atomy::Pattern show all
Defined in:
lib/atomy/pattern/instance_variable.rb

Instance Attribute Summary collapse

Attributes inherited from Atomy::Pattern

#from_node

Instance Method Summary collapse

Methods inherited from Atomy::Pattern

#===, #inline_matches?, #target

Constructor Details

#initialize(name) ⇒ InstanceVariable

Returns a new instance of InstanceVariable.



7
8
9
# File 'lib/atomy/pattern/instance_variable.rb', line 7

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/atomy/pattern/instance_variable.rb', line 5

def name
  @name
end

Instance Method Details

#matches?(_) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/atomy/pattern/instance_variable.rb', line 11

def matches?(_)
  true
end