Class: ActionView::Storybook::Controls::ObjectConfig

Inherits:
ControlConfig
  • Object
show all
Defined in:
lib/action_view/storybook/controls/object_config.rb

Instance Attribute Summary

Attributes inherited from ControlConfig

#name, #param, #value

Instance Method Summary collapse

Methods inherited from ControlConfig

#initialize, #to_csf_params

Constructor Details

This class inherits a constructor from ActionView::Storybook::Controls::ControlConfig

Instance Method Details

#typeObject



7
8
9
# File 'lib/action_view/storybook/controls/object_config.rb', line 7

def type
  :object
end

#value_from_param(param) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/action_view/storybook/controls/object_config.rb', line 11

def value_from_param(param)
  if param.is_a?(String)
    JSON.parse(param).deep_symbolize_keys
  else
    super(param)
  end
end