Class: ViewComponent::Storybook::Story

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations
Defined in:
lib/view_component/storybook/story.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(component, content_block, slots, layout) ⇒ Story

Returns a new instance of Story.



10
11
12
13
14
15
# File 'lib/view_component/storybook/story.rb', line 10

def initialize(component, content_block, slots, layout)
  @component = component
  @content_block = content_block
  @slots = slots
  @layout = layout
end

Instance Attribute Details

#componentObject (readonly)

Returns the value of attribute component.



8
9
10
# File 'lib/view_component/storybook/story.rb', line 8

def component
  @component
end

#content_blockObject (readonly)

Returns the value of attribute content_block.



8
9
10
# File 'lib/view_component/storybook/story.rb', line 8

def content_block
  @content_block
end

#layoutObject (readonly)

Returns the value of attribute layout.



8
9
10
# File 'lib/view_component/storybook/story.rb', line 8

def layout
  @layout
end

#slotsObject (readonly)

Returns the value of attribute slots.



8
9
10
# File 'lib/view_component/storybook/story.rb', line 8

def slots
  @slots
end