Class: Oso::Polar::Pattern
- Inherits:
-
Object
- Object
- Oso::Polar::Pattern
- Defined in:
- lib/oso/polar/pattern.rb
Overview
Polar pattern.
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
- #==(other) ⇒ Boolean (also: #eql?)
-
#initialize(tag, fields) ⇒ Pattern
constructor
A new instance of Pattern.
Constructor Details
#initialize(tag, fields) ⇒ Pattern
Returns a new instance of Pattern.
11 12 13 14 |
# File 'lib/oso/polar/pattern.rb', line 11 def initialize(tag, fields) @tag = tag @fields = fields end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
7 8 9 |
# File 'lib/oso/polar/pattern.rb', line 7 def fields @fields end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
7 8 9 |
# File 'lib/oso/polar/pattern.rb', line 7 def tag @tag end |
Instance Method Details
#==(other) ⇒ Boolean Also known as: eql?
18 19 20 |
# File 'lib/oso/polar/pattern.rb', line 18 def ==(other) tag == other.tag && fields == other.fields end |