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.
23 24 25 26 |
# File 'app/models/coupdoeil/popover/option.rb', line 23 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.
9 10 11 |
# File 'app/models/coupdoeil/popover/option.rb', line 9 def bit_size @bit_size end |
.key ⇒ Object
Returns the value of attribute key.
9 10 11 |
# File 'app/models/coupdoeil/popover/option.rb', line 9 def key @key end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
21 22 23 |
# File 'app/models/coupdoeil/popover/option.rb', line 21 def value @value end |
Class Method Details
.inherited(subclass) ⇒ Object
13 14 15 16 17 18 |
# File 'app/models/coupdoeil/popover/option.rb', line 13 def inherited(subclass) super subclass.class_eval do @key = name.demodulize.underscore.to_sym end end |
.into_bits(value) ⇒ Object
11 |
# File 'app/models/coupdoeil/popover/option.rb', line 11 def into_bits(value) = parse(value) |
Instance Method Details
#validate! ⇒ Object
28 |
# File 'app/models/coupdoeil/popover/option.rb', line 28 def validate! = raise(NotImplementedError) |