Class: Tagline::Line
- Inherits:
-
Object
- Object
- Tagline::Line
- Extended by:
- Forwardable
- Defined in:
- lib/tagline/line.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text) ⇒ Line
constructor
A new instance of Line.
- #toggle(tag) ⇒ Object
Constructor Details
#initialize(text) ⇒ Line
Returns a new instance of Line.
7 8 9 10 |
# File 'lib/tagline/line.rb', line 7 def initialize(text) @text = text @tags = Hash.new(false) end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
4 5 6 |
# File 'lib/tagline/line.rb', line 4 def text @text end |
Instance Method Details
#toggle(tag) ⇒ Object
12 13 14 |
# File 'lib/tagline/line.rb', line 12 def toggle(tag) self[tag] = !self[tag] end |