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