Method: ViewComponent::Storybook::Collections::ValidForStoryConcern#valid_for_story?

Defined in:
lib/view_component/storybook/collections/valid_for_story_concern.rb

#valid_for_story?(story_name, only:, except:) ⇒ Boolean

Returns:

  • (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