Class: AuditTables::Base
- Inherits:
-
Object
- Object
- AuditTables::Base
- Defined in:
- lib/audit_tables/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#audit_table_name ⇒ Object
Returns the value of attribute audit_table_name.
-
#column ⇒ Object
Returns the value of attribute column.
-
#klass ⇒ Object
Returns the value of attribute klass.
-
#table_name ⇒ Object
Returns the value of attribute table_name.
Instance Method Summary collapse
-
#initialize(table_name) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(table_name) ⇒ Base
Returns a new instance of Base.
6 7 8 9 10 |
# File 'lib/audit_tables/base.rb', line 6 def initialize(table_name) @table_name = table_name @audit_table_name = "audit_#{table_name}" @klass = table_name.classify.safe_constantize end |
Instance Attribute Details
#audit_table_name ⇒ Object
Returns the value of attribute audit_table_name.
4 5 6 |
# File 'lib/audit_tables/base.rb', line 4 def audit_table_name @audit_table_name end |
#column ⇒ Object
Returns the value of attribute column.
4 5 6 |
# File 'lib/audit_tables/base.rb', line 4 def column @column end |
#klass ⇒ Object
Returns the value of attribute klass.
4 5 6 |
# File 'lib/audit_tables/base.rb', line 4 def klass @klass end |
#table_name ⇒ Object
Returns the value of attribute table_name.
4 5 6 |
# File 'lib/audit_tables/base.rb', line 4 def table_name @table_name end |