Class: ReactComponent::Params
- Inherits:
-
Object
- Object
- ReactComponent::Params
- Defined in:
- lib/jekyll-react-component/react_component/params.rb
Instance Method Summary collapse
-
#initialize(params) ⇒ Params
constructor
A new instance of Params.
Constructor Details
#initialize(params) ⇒ Params
Returns a new instance of Params.
19 20 21 22 |
# File 'lib/jekyll-react-component/react_component/params.rb', line 19 def initialize(params) JSON::Validator.validate!(COMPONENT_SCHEMA, params) @params = JSON.parse(params, symbolize_names: true) end |