Class: Relegate::Configuration
- Inherits:
-
Object
- Object
- Relegate::Configuration
- Defined in:
- lib/relegate/configuration.rb
Overview
rubocop:disable Style/Documentation
Instance Attribute Summary collapse
-
#column_name ⇒ Object
Returns the value of attribute column_name.
- #mark_method_name ⇒ Object
- #marked_scope_name ⇒ Object
- #unmark_method_name ⇒ Object
- #unmarked_scope_name ⇒ Object
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 |
# File 'lib/relegate/configuration.rb', line 8 def initialize @column_name = :archived_at end |
Instance Attribute Details
#column_name ⇒ Object
Returns the value of attribute column_name.
5 6 7 |
# File 'lib/relegate/configuration.rb', line 5 def column_name @column_name end |
#mark_method_name ⇒ Object
20 21 22 |
# File 'lib/relegate/configuration.rb', line 20 def mark_method_name @mark_method_name || verb.to_sym end |
#marked_scope_name ⇒ Object
12 13 14 |
# File 'lib/relegate/configuration.rb', line 12 def marked_scope_name @marked_scope_name || @column_name.to_s.sub(/_at\z/, "").to_sym end |
#unmark_method_name ⇒ Object
24 25 26 |
# File 'lib/relegate/configuration.rb', line 24 def unmark_method_name @unmark_method_name || :"un#{verb}" end |
#unmarked_scope_name ⇒ Object
16 17 18 |
# File 'lib/relegate/configuration.rb', line 16 def unmarked_scope_name @unmarked_scope_name || :"un#{marked_scope_name}" end |