Class: Md2key::Nodes::Line

Inherits:
Struct
  • Object
show all
Defined in:
lib/md2key/nodes/line.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLine

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

#indentObject

Returns the value of attribute indent

Returns:

  • (Object)

    the current value of indent



3
4
5
# File 'lib/md2key/nodes/line.rb', line 3

def indent
  @indent
end

#textObject

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



3
4
5
# File 'lib/md2key/nodes/line.rb', line 3

def text
  @text
end

Instance Method Details

#indented?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/md2key/nodes/line.rb', line 9

def indented?
  indent > 0
end