Class: Syobocal::Comment::Element::Text
- Inherits:
-
Object
- Object
- Syobocal::Comment::Element::Text
- Defined in:
- lib/syobocal/comment/element/text.rb
Instance Attribute Summary collapse
-
#str ⇒ Object
readonly
Returns the value of attribute str.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(str) ⇒ Text
constructor
A new instance of Text.
Constructor Details
#initialize(str) ⇒ Text
Returns a new instance of Text.
7 8 9 |
# File 'lib/syobocal/comment/element/text.rb', line 7 def initialize(str) @str = str end |
Instance Attribute Details
#str ⇒ Object (readonly)
Returns the value of attribute str.
5 6 7 |
# File 'lib/syobocal/comment/element/text.rb', line 5 def str @str end |
Class Method Details
.create(text) ⇒ Object
15 16 17 |
# File 'lib/syobocal/comment/element/text.rb', line 15 def self.create(text) new(text) end |
Instance Method Details
#==(other) ⇒ Object
11 12 13 |
# File 'lib/syobocal/comment/element/text.rb', line 11 def ==(other) other.instance_of?(self.class) && other.str == str end |