Class: Coupdoeil::Popover::Option::Animation

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

Constant Summary collapse

VALUES =
%w[slide-in fade-in slide-out custom].unshift(false).freeze
INDEX_BY_VALUES =
VALUES.each_with_index.to_h.with_indifferent_access.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



13
# File 'app/models/coupdoeil/popover/option/animation.rb', line 13

def parse(value) = INDEX_BY_VALUES.fetch(value)

Instance Method Details

#validate!Object



16
# File 'app/models/coupdoeil/popover/option/animation.rb', line 16

def validate! = validate_inclusion!