Exception: ViewComponent::Storybook::Stories::ValidationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/view_component/storybook/stories.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stories) ⇒ ValidationError

Returns a new instance of ValidationError.



142
143
144
145
146
# File 'lib/view_component/storybook/stories.rb', line 142

def initialize(stories)
  @stories = stories

  super("#{@stories.class.name} invalid: (#{@stories.errors.full_messages.join(', ')})")
end

Instance Attribute Details

#storiesObject (readonly)

Returns the value of attribute stories.



140
141
142
# File 'lib/view_component/storybook/stories.rb', line 140

def stories
  @stories
end