Class: MetaRuby::GUI::HTML::Page::Fragment
- Inherits:
-
Object
- Object
- MetaRuby::GUI::HTML::Page::Fragment
- Defined in:
- lib/metaruby/gui/html/page.rb
Overview
A page fragment (or section)
Instance Attribute Summary collapse
-
#buttons ⇒ Array<Button>
readonly
A list of buttons to be rendered before the fragment title and its content.
-
#html ⇒ Object
The fragment’s HTML content.
-
#id ⇒ Object
The fragment ID (as, in, HTML id).
-
#title ⇒ Object
The fragmen title (rendered with <h2>).
Instance Method Summary collapse
-
#initialize(title, html, id: nil, buttons: Array.new) ⇒ Fragment
constructor
Create a new fragment.
Constructor Details
#initialize(title, html, id: nil, buttons: Array.new) ⇒ Fragment
Create a new fragment
96 97 98 99 100 101 |
# File 'lib/metaruby/gui/html/page.rb', line 96 def initialize(title, html, id: nil, buttons: Array.new) @title = title @html = html @id = id @buttons = end |
Instance Attribute Details
#buttons ⇒ Array<Button> (readonly)
A list of buttons to be rendered before the fragment title and its content
93 94 95 |
# File 'lib/metaruby/gui/html/page.rb', line 93 def @buttons end |
#html ⇒ Object
The fragment’s HTML content
86 87 88 |
# File 'lib/metaruby/gui/html/page.rb', line 86 def html @html end |
#id ⇒ Object
The fragment ID (as, in, HTML id)
88 89 90 |
# File 'lib/metaruby/gui/html/page.rb', line 88 def id @id end |
#title ⇒ Object
The fragmen title (rendered with <h2>)
84 85 86 |
# File 'lib/metaruby/gui/html/page.rb', line 84 def title @title end |