ScenarioGroupEntity
Represents a group of preview scenarios within a preview class.
Instance Methods
Annotations
#
tags
(tag_name = nil)
→ Array<YardTag>
Collection of tags from each of the scenarios in the group. Can be filtered by tag name by providing the name as an argument.
Arguments:
tag_name
|
Symbol
|
Optional tag type to filter by |
Example:
all_tags = group.tags
display_tags = group.tags(:display)
Display options
#
display_options
→ Hash
Display options hash.
Identity
#
id
→ String
Human-readable unique ID for the entity.
#
label
→ String
Titlized name for use in navigation etc.
#
name
→ String
Parameter-safe entity name.
#
type
→ Symbol
Entity type identifier.
Returns :scenario_group
for scenario groups.
Paths
#
lookup_path
→ String
Canonical reference path.
Aliases:
Render Targets
#
render_targets
→ Array<RenderableEntity>
Collection of render targets (components or partials) from each of the scenarios in the group.
Example:
"This group renders: #{group.render_targets.map(&:label).join(", ")}"
Aliases:
Scenarios
#
scenarios
→ Array<ScenarioEntity>
Returns all scenarios within the group.
URLs
#
inspect_path
→ String
The inspector URL path for this scenario group.
Aliases:
#
preview_path
→ String
The standalone preview URL path for this scenario group.
Visibility
#
visible?
→ Boolean
Whether or not the entity is visible (i.e. present in navigation).
Other
#
preview
→ PreviewEntity
The preview that this scenario belongs to.