Class: Richard::Internal::TextLine
- Inherits:
-
Object
- Object
- Richard::Internal::TextLine
- Defined in:
- lib/richard_iii/internal/text_line.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text) ⇒ TextLine
constructor
A new instance of TextLine.
- #matches?(text) ⇒ Boolean
Constructor Details
#initialize(text) ⇒ TextLine
Returns a new instance of TextLine.
6 7 8 |
# File 'lib/richard_iii/internal/text_line.rb', line 6 def initialize(text) @text = text || fail("You need to supply some text even if it's empty") end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
4 5 6 |
# File 'lib/richard_iii/internal/text_line.rb', line 4 def text @text end |
Instance Method Details
#matches?(text) ⇒ Boolean
10 11 12 |
# File 'lib/richard_iii/internal/text_line.rb', line 10 def matches?(text) @text.eql?(text) end |