Class: Polites::Text
- Inherits:
-
Object
- Object
- Polites::Text
- Defined in:
- lib/polites/text.rb
Overview
A piece of simple text to be output directly. A stand-in for a simple string.
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
-
#initialize(text) ⇒ Text
constructor
A new instance of Text.
Constructor Details
#initialize(text) ⇒ Text
Returns a new instance of Text.
10 11 12 |
# File 'lib/polites/text.rb', line 10 def initialize(text) @text = text end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
7 8 9 |
# File 'lib/polites/text.rb', line 7 def text @text end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
14 15 16 |
# File 'lib/polites/text.rb', line 14 def eql?(other) other.is_a?(self.class) && text == other.text end |