Class: Coupdoeil::Popover::Option
- Inherits:
-
Object
- Object
- Coupdoeil::Popover::Option
- Defined in:
- app/models/coupdoeil/popover/option.rb,
app/models/coupdoeil/popover/option/cache.rb,
app/models/coupdoeil/popover/option/offset.rb,
app/models/coupdoeil/popover/option/loading.rb,
app/models/coupdoeil/popover/option/trigger.rb,
app/models/coupdoeil/popover/option/animation.rb,
app/models/coupdoeil/popover/option/placement.rb,
app/models/coupdoeil/popover/option/opening_delay.rb
Defined Under Namespace
Classes: Animation, Cache, Loading, Offset, OpeningDelay, Placement, Trigger
Constant Summary collapse
- InvalidOptionError =
Class.new(StandardError)
Class Attribute Summary collapse
-
.bit_size ⇒ Object
Returns the value of attribute bit_size.
-
.key ⇒ Object
Returns the value of attribute key.
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(value) ⇒ Option
constructor
A new instance of Option.
- #validate! ⇒ Object
Constructor Details
#initialize(value) ⇒ Option
Returns a new instance of Option.
22 23 24 25 |
# File 'app/models/coupdoeil/popover/option.rb', line 22 def initialize(value) value = value.to_s if value.is_a? Symbol @value = value end |
Class Attribute Details
.bit_size ⇒ Object
Returns the value of attribute bit_size.
8 9 10 |
# File 'app/models/coupdoeil/popover/option.rb', line 8 def bit_size @bit_size end |
.key ⇒ Object
Returns the value of attribute key.
8 9 10 |
# File 'app/models/coupdoeil/popover/option.rb', line 8 def key @key end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
20 21 22 |
# File 'app/models/coupdoeil/popover/option.rb', line 20 def value @value end |
Class Method Details
.inherited(subclass) ⇒ Object
12 13 14 15 16 17 |
# File 'app/models/coupdoeil/popover/option.rb', line 12 def inherited(subclass) super subclass.class_eval do @key = name.demodulize.underscore.to_sym end end |
.into_bits(value) ⇒ Object
10 |
# File 'app/models/coupdoeil/popover/option.rb', line 10 def into_bits(value) = parse(value) |
Instance Method Details
#validate! ⇒ Object
27 |
# File 'app/models/coupdoeil/popover/option.rb', line 27 def validate! = raise(NotImplementedError) |