Class: ReactComponent::Params

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll-react-component/react_component/params.rb

Instance Method Summary collapse

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