Class: PgSync::Sequence
- Inherits:
-
Object
- Object
- PgSync::Sequence
- Defined in:
- lib/pgsync/sequence.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #full_name ⇒ Object
-
#hash ⇒ Object
override hash when overriding eql?.
-
#initialize(schema, name, column:) ⇒ Sequence
constructor
A new instance of Sequence.
- #to_s ⇒ Object
Constructor Details
#initialize(schema, name, column:) ⇒ Sequence
Returns a new instance of Sequence.
6 7 8 9 10 |
# File 'lib/pgsync/sequence.rb', line 6 def initialize(schema, name, column:) @schema = schema @name = name @column = column end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
4 5 6 |
# File 'lib/pgsync/sequence.rb', line 4 def column @column end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/pgsync/sequence.rb', line 4 def name @name end |
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
4 5 6 |
# File 'lib/pgsync/sequence.rb', line 4 def schema @schema end |
Instance Method Details
#eql?(other) ⇒ Boolean
16 17 18 |
# File 'lib/pgsync/sequence.rb', line 16 def eql?(other) other.schema == schema && other.name == name end |
#full_name ⇒ Object
12 13 14 |
# File 'lib/pgsync/sequence.rb', line 12 def full_name "#{schema}.#{name}" end |
#hash ⇒ Object
override hash when overriding eql?
21 22 23 |
# File 'lib/pgsync/sequence.rb', line 21 def hash [schema, name].hash end |
#to_s ⇒ Object
25 26 27 |
# File 'lib/pgsync/sequence.rb', line 25 def to_s full_name end |