Class: Ominous::Closer

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/ominous/closer.rb

Constant Summary collapse

CLOSURE_METHODS =
{
  :reveal_hidden => 'Hides the current closers and reveals any hidden closers', 
  :close_and_dismiss_warning => 'Closes the warning message and tells server not to display warning again', 
  :redirect => 'Link to take user to closer.url without clearing the warning' 
}

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.closure_methodsObject



14
15
16
# File 'app/models/ominous/closer.rb', line 14

def self.closure_methods
  CLOSURE_METHODS
end

Instance Method Details



18
19
20
# File 'app/models/ominous/closer.rb', line 18

def link_text
  super.blank? ? "click here to #{closure_method}".humanize : super
end