Class: ActionView::Storybook::Controls::DateConfig
- Inherits:
-
ControlConfig
- Object
- ControlConfig
- ActionView::Storybook::Controls::DateConfig
- Defined in:
- lib/action_view/storybook/controls/date_config.rb
Instance Attribute Summary
Attributes inherited from ControlConfig
Instance Method Summary collapse
-
#initialize(param, value, name: nil) ⇒ DateConfig
constructor
A new instance of DateConfig.
- #type ⇒ Object
- #value_from_param(param) ⇒ Object
Methods inherited from ControlConfig
Constructor Details
#initialize(param, value, name: nil) ⇒ DateConfig
Returns a new instance of DateConfig.
7 8 9 |
# File 'lib/action_view/storybook/controls/date_config.rb', line 7 def initialize(param, value, name: nil) super(param, value, name: name) end |
Instance Method Details
#type ⇒ Object
11 12 13 |
# File 'lib/action_view/storybook/controls/date_config.rb', line 11 def type :date end |
#value_from_param(param) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/action_view/storybook/controls/date_config.rb', line 15 def value_from_param(param) if param.is_a?(String) DateTime.iso8601(param) else super(param) end end |