Class: RdbmsSampler::Dependency
- Inherits:
-
Object
- Object
- RdbmsSampler::Dependency
- Defined in:
- lib/rdbms_sampler/dependency.rb
Instance Attribute Summary collapse
-
#child_key ⇒ Object
readonly
Returns the value of attribute child_key.
-
#child_schema_name ⇒ Object
readonly
Returns the value of attribute child_schema_name.
-
#child_table_name ⇒ Object
readonly
Returns the value of attribute child_table_name.
-
#parent_key ⇒ Object
readonly
Returns the value of attribute parent_key.
-
#parent_schema ⇒ Object
readonly
Returns the value of attribute parent_schema.
-
#parent_table ⇒ Object
readonly
Returns the value of attribute parent_table.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #identifier ⇒ Object
-
#initialize(parent_schema, parent_table, parent_key, child_schema, child_table, child_key, value) ⇒ Dependency
constructor
A new instance of Dependency.
- #to_s ⇒ Object
Constructor Details
#initialize(parent_schema, parent_table, parent_key, child_schema, child_table, child_key, value) ⇒ Dependency
Returns a new instance of Dependency.
12 13 14 15 16 17 18 19 20 |
# File 'lib/rdbms_sampler/dependency.rb', line 12 def initialize(parent_schema, parent_table, parent_key, child_schema, child_table, child_key, value) @parent_schema = parent_schema @parent_table = parent_table @parent_key = parent_key @child_schema_name = child_schema @child_table_name = child_table @child_key = child_key @value = value end |
Instance Attribute Details
#child_key ⇒ Object (readonly)
Returns the value of attribute child_key.
9 10 11 |
# File 'lib/rdbms_sampler/dependency.rb', line 9 def child_key @child_key end |
#child_schema_name ⇒ Object (readonly)
Returns the value of attribute child_schema_name.
7 8 9 |
# File 'lib/rdbms_sampler/dependency.rb', line 7 def child_schema_name @child_schema_name end |
#child_table_name ⇒ Object (readonly)
Returns the value of attribute child_table_name.
8 9 10 |
# File 'lib/rdbms_sampler/dependency.rb', line 8 def child_table_name @child_table_name end |
#parent_key ⇒ Object (readonly)
Returns the value of attribute parent_key.
6 7 8 |
# File 'lib/rdbms_sampler/dependency.rb', line 6 def parent_key @parent_key end |
#parent_schema ⇒ Object (readonly)
Returns the value of attribute parent_schema.
4 5 6 |
# File 'lib/rdbms_sampler/dependency.rb', line 4 def parent_schema @parent_schema end |
#parent_table ⇒ Object (readonly)
Returns the value of attribute parent_table.
5 6 7 |
# File 'lib/rdbms_sampler/dependency.rb', line 5 def parent_table @parent_table end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
10 11 12 |
# File 'lib/rdbms_sampler/dependency.rb', line 10 def value @value end |
Instance Method Details
#eql?(other) ⇒ Boolean
26 27 28 |
# File 'lib/rdbms_sampler/dependency.rb', line 26 def eql? other identifier == other.identifier and child_key == other.child_key and value == other.value end |
#identifier ⇒ Object
22 23 24 |
# File 'lib/rdbms_sampler/dependency.rb', line 22 def identifier "#{child_schema_name}.#{child_table_name}" end |
#to_s ⇒ Object
30 31 32 |
# File 'lib/rdbms_sampler/dependency.rb', line 30 def to_s "reference from #{parent_schema}.#{parent_table}.#{parent_key} to #{identifier}[#{child_key}=#{value}]" end |