Class: DataSampler::Dependency
- Inherits:
-
Object
- Object
- DataSampler::Dependency
- Defined in:
- lib/data_sampler/dependency.rb
Instance Attribute Summary collapse
-
#keys ⇒ Object
readonly
Returns the value of attribute keys.
-
#referring_table_name ⇒ Object
readonly
Returns the value of attribute referring_table_name.
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
-
#initialize(table_name, keys, referring_table_name) ⇒ Dependency
constructor
A new instance of Dependency.
- #to_s ⇒ Object
Constructor Details
#initialize(table_name, keys, referring_table_name) ⇒ Dependency
Returns a new instance of Dependency.
8 9 10 11 12 |
# File 'lib/data_sampler/dependency.rb', line 8 def initialize(table_name, keys, referring_table_name) @table_name = table_name @keys = keys @referring_table_name = referring_table_name end |
Instance Attribute Details
#keys ⇒ Object (readonly)
Returns the value of attribute keys.
5 6 7 |
# File 'lib/data_sampler/dependency.rb', line 5 def keys @keys end |
#referring_table_name ⇒ Object (readonly)
Returns the value of attribute referring_table_name.
6 7 8 |
# File 'lib/data_sampler/dependency.rb', line 6 def referring_table_name @referring_table_name end |
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name.
4 5 6 |
# File 'lib/data_sampler/dependency.rb', line 4 def table_name @table_name end |
Instance Method Details
#eql?(other) ⇒ Boolean
14 15 16 |
# File 'lib/data_sampler/dependency.rb', line 14 def eql? other table_name == other.table_name and keys == other.keys end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/data_sampler/dependency.rb', line 18 def to_s "row with keys #{keys} in table `#{table_name}` (referred from `#{referring_table_name}`)" end |