Class: ViewComponent::DocsBuilderComponent::Section

Inherits:
Struct
  • Object
show all
Defined in:
lib/view_component/docs_builder_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(heading: nil, methods: [], show_types: true) ⇒ Section

Returns a new instance of Section.



6
7
8
9
# File 'lib/view_component/docs_builder_component.rb', line 6

def initialize(heading: nil, methods: [], show_types: true)
  methods.sort_by! { |method| method[:name] }
  super
end

Instance Attribute Details

#headingObject

Returns the value of attribute heading

Returns:

  • (Object)

    the current value of heading



5
6
7
# File 'lib/view_component/docs_builder_component.rb', line 5

def heading
  @heading
end

#methodsObject

Returns the value of attribute methods

Returns:

  • (Object)

    the current value of methods



5
6
7
# File 'lib/view_component/docs_builder_component.rb', line 5

def methods
  @methods
end

#show_typesObject

Returns the value of attribute show_types

Returns:

  • (Object)

    the current value of show_types



5
6
7
# File 'lib/view_component/docs_builder_component.rb', line 5

def show_types
  @show_types
end