Class: Querly::Pattern::Argument::Base
- Inherits:
-
Object
- Object
- Querly::Pattern::Argument::Base
- Defined in:
- lib/querly/pattern/argument.rb
Instance Attribute Summary collapse
-
#tail ⇒ Object
readonly
Returns the value of attribute tail.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #attributes ⇒ Object
-
#initialize(tail:) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(tail:) ⇒ Base
Returns a new instance of Base.
7 8 9 |
# File 'lib/querly/pattern/argument.rb', line 7 def initialize(tail:) @tail = tail end |
Instance Attribute Details
#tail ⇒ Object (readonly)
Returns the value of attribute tail.
5 6 7 |
# File 'lib/querly/pattern/argument.rb', line 5 def tail @tail end |
Instance Method Details
#==(other) ⇒ Object
11 12 13 |
# File 'lib/querly/pattern/argument.rb', line 11 def ==(other) other.class == self.class && other.attributes == attributes end |
#attributes ⇒ Object
15 16 17 18 19 |
# File 'lib/querly/pattern/argument.rb', line 15 def attributes instance_variables.each.with_object({}) do |name, hash| hash[name] = instance_variable_get(name) end end |