Class: Atomy::Pattern::Attribute

Inherits:
Atomy::Pattern show all
Defined in:
lib/atomy/pattern/attribute.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(receiver, arguments = []) ⇒ Attribute

Returns a new instance of Attribute.



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

def initialize(receiver, arguments = [])
  @receiver = receiver
  @arguments = arguments
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments.



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

def arguments
  @arguments
end

#receiverObject (readonly)

Returns the value of attribute receiver.



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

def receiver
  @receiver
end

Instance Method Details

#matches?(_) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/atomy/pattern/attribute.rb', line 12

def matches?(_)
  true
end