Class: Relegate::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/relegate/configuration.rb

Overview

rubocop:disable Style/Documentation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_nameObject

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_nameObject



20
21
22
# File 'lib/relegate/configuration.rb', line 20

def mark_method_name
  @mark_method_name || verb.to_sym
end

#marked_scope_nameObject



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_nameObject



24
25
26
# File 'lib/relegate/configuration.rb', line 24

def unmark_method_name
  @unmark_method_name || :"un#{verb}"
end

#unmarked_scope_nameObject



16
17
18
# File 'lib/relegate/configuration.rb', line 16

def unmarked_scope_name
  @unmarked_scope_name || :"un#{marked_scope_name}"
end