Class: SeedMigration::RegisterEntry
- Inherits:
-
Object
- Object
- SeedMigration::RegisterEntry
- Defined in:
- lib/seed_migration/register_entry.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
- #eql?(object) ⇒ Boolean
- #exclude(*attrs) ⇒ Object
- #hash ⇒ Object
-
#initialize(model) ⇒ RegisterEntry
constructor
A new instance of RegisterEntry.
Constructor Details
#initialize(model) ⇒ RegisterEntry
Returns a new instance of RegisterEntry.
6 7 8 9 |
# File 'lib/seed_migration/register_entry.rb', line 6 def initialize(model) @model = model @attributes = model.attribute_names.dup end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
4 5 6 |
# File 'lib/seed_migration/register_entry.rb', line 4 def attributes @attributes end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
3 4 5 |
# File 'lib/seed_migration/register_entry.rb', line 3 def model @model end |
Instance Method Details
#eql?(object) ⇒ Boolean
15 16 17 |
# File 'lib/seed_migration/register_entry.rb', line 15 def eql?(object) object.class == self.class && object.model == self.model end |
#exclude(*attrs) ⇒ Object
11 12 13 |
# File 'lib/seed_migration/register_entry.rb', line 11 def exclude(*attrs) attrs.map(&:to_s).each { |attr| exclude_single_attributes attr } end |
#hash ⇒ Object
19 20 21 |
# File 'lib/seed_migration/register_entry.rb', line 19 def hash model.hash end |