Class: Fooltip::Link

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/fooltip/link.rb

Constant Summary collapse

PLACEMENT_MAPPINGS =
{ 1 => 'top', 2 => 'right', 3 => 'bottom', 4 => 'left' }
TRIGGER_MAPPINGS =
{ 1 => 'click', 2 => 'hover', 3 => 'focus', 4 => 'manual' }

Instance Method Summary collapse

Instance Method Details

#placement_stringObject



16
17
18
# File 'app/models/fooltip/link.rb', line 16

def placement_string
  PLACEMENT_MAPPINGS[placement] || 'right'
end

#trigger_stringObject



20
21
22
# File 'app/models/fooltip/link.rb', line 20

def trigger_string
  TRIGGER_MAPPINGS[trigger] || 'focus'
end