Class: Coupdoeil::Popover::Option::Trigger

Inherits:
Coupdoeil::Popover::Option show all
Defined in:
app/models/coupdoeil/popover/option/trigger.rb

Constant Summary collapse

VALUES =
%w[click hover].freeze

Constants inherited from Coupdoeil::Popover::Option

InvalidOptionError

Instance Attribute Summary

Attributes inherited from Coupdoeil::Popover::Option

#value

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Coupdoeil::Popover::Option

inherited, #initialize, into_bits

Constructor Details

This class inherits a constructor from Coupdoeil::Popover::Option

Class Method Details

.parse(value) ⇒ Object



12
# File 'app/models/coupdoeil/popover/option/trigger.rb', line 12

def parse(value) = value.to_s == "click" ? 1 : 0

Instance Method Details

#validate!Object



15
# File 'app/models/coupdoeil/popover/option/trigger.rb', line 15

def validate! = validate_inclusion!