Class: Md2key::Nodes::Line
- Inherits:
-
Struct
- Object
- Struct
- Md2key::Nodes::Line
- Defined in:
- lib/md2key/nodes/line.rb
Instance Attribute Summary collapse
-
#indent ⇒ Object
Returns the value of attribute indent.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
- #indented? ⇒ Boolean
-
#initialize ⇒ Line
constructor
A new instance of Line.
Constructor Details
#initialize ⇒ Line
Returns a new instance of Line.
4 5 6 7 |
# File 'lib/md2key/nodes/line.rb', line 4 def initialize(*) super self.indent ||= 0 end |
Instance Attribute Details
#indent ⇒ Object
Returns the value of attribute indent
3 4 5 |
# File 'lib/md2key/nodes/line.rb', line 3 def indent @indent end |
#text ⇒ Object
Returns the value of attribute text
3 4 5 |
# File 'lib/md2key/nodes/line.rb', line 3 def text @text end |
Instance Method Details
#indented? ⇒ Boolean
9 10 11 |
# File 'lib/md2key/nodes/line.rb', line 9 def indented? indent > 0 end |