Module: ViewComponent::Storybook::Collections::ValidForStoryConcern
- Extended by:
- ActiveSupport::Concern
- Included in:
- ControlsCollection, LayoutCollection, ParametersCollection
- Defined in:
- lib/view_component/storybook/collections/valid_for_story_concern.rb
Instance Method Summary collapse
Instance Method Details
permalink #valid_for_story?(story_name, only:, except:) ⇒ Boolean
9 10 11 |
# File 'lib/view_component/storybook/collections/valid_for_story_concern.rb', line 9 def valid_for_story?(story_name, only:, except:) (only.nil? || Array.wrap(only).include?(story_name)) && Array.wrap(except).exclude?(story_name) end |