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