Class: ViewComponent::DocsBuilderComponent::Section
- Inherits:
-
Struct
- Object
- Struct
- ViewComponent::DocsBuilderComponent::Section
- Defined in:
- lib/view_component/docs_builder_component.rb
Instance Attribute Summary collapse
-
#error_klasses ⇒ Object
Returns the value of attribute error_klasses.
-
#heading ⇒ Object
Returns the value of attribute heading.
-
#methods ⇒ Object
Returns the value of attribute methods.
-
#show_types ⇒ Object
Returns the value of attribute show_types.
Instance Method Summary collapse
-
#initialize(heading: nil, methods: [], error_klasses: [], show_types: true) ⇒ Section
constructor
A new instance of Section.
Constructor Details
#initialize(heading: nil, methods: [], error_klasses: [], show_types: true) ⇒ Section
Returns a new instance of Section.
6 7 8 9 10 |
# File 'lib/view_component/docs_builder_component.rb', line 6 def initialize(heading: nil, methods: [], error_klasses: [], show_types: true) methods.sort_by! { |method| method[:name] } error_klasses.sort! super end |
Instance Attribute Details
#error_klasses ⇒ Object
Returns the value of attribute error_klasses
5 6 7 |
# File 'lib/view_component/docs_builder_component.rb', line 5 def error_klasses @error_klasses end |
#heading ⇒ Object
Returns the value of attribute heading
5 6 7 |
# File 'lib/view_component/docs_builder_component.rb', line 5 def heading @heading end |
#methods ⇒ Object
Returns the value of attribute methods
5 6 7 |
# File 'lib/view_component/docs_builder_component.rb', line 5 def methods @methods end |
#show_types ⇒ Object
Returns the value of attribute show_types
5 6 7 |
# File 'lib/view_component/docs_builder_component.rb', line 5 def show_types @show_types end |