Class: Docs::Header
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- Docs::Header
- Defined in:
- lib/ruby_ui/docs/header.rb
Instance Method Summary collapse
-
#initialize(title:, description: nil) ⇒ Header
constructor
A new instance of Header.
- #view_template ⇒ Object
Constructor Details
#initialize(title:, description: nil) ⇒ Header
Returns a new instance of Header.
5 6 7 8 |
# File 'lib/ruby_ui/docs/header.rb', line 5 def initialize(title:, description: nil) @title = title @description = description end |
Instance Method Details
#view_template ⇒ Object
10 11 12 13 14 15 |
# File 'lib/ruby_ui/docs/header.rb', line 10 def view_template div do h1 { @title } p { @description } if @description end end |