Class: HtmlCom::Tabs::Tab
- Inherits:
-
Object
- Object
- HtmlCom::Tabs::Tab
- Defined in:
- lib/htmlcom.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
- #delete ⇒ Object
-
#initialize(title, content: '', callback: nil) ⇒ Tab
constructor
A new instance of Tab.
- #to_a ⇒ Object
Constructor Details
#initialize(title, content: '', callback: nil) ⇒ Tab
Returns a new instance of Tab.
129 130 131 |
# File 'lib/htmlcom.rb', line 129 def initialize(title, content: '', callback: nil) @title, @content, @callback = title, content, callback end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
127 128 129 |
# File 'lib/htmlcom.rb', line 127 def content @content end |
#title ⇒ Object
Returns the value of attribute title.
127 128 129 |
# File 'lib/htmlcom.rb', line 127 def title @title end |
Instance Method Details
#delete ⇒ Object
138 139 140 141 |
# File 'lib/htmlcom.rb', line 138 def delete() @title = nil @callback.ping end |
#to_a ⇒ Object
148 149 150 |
# File 'lib/htmlcom.rb', line 148 def to_a() [@title, @content] end |