class MarkdownToRspec::ToRspec::Item::Base
Public Instance Methods
children()
click to toggle source
# File lib/markdown_to_rspec/to_rspec/item/base.rb, line 11 def children raise NotImplementedError end
convert()
click to toggle source
# File lib/markdown_to_rspec/to_rspec/item/base.rb, line 19 def convert raise NotImplementedError end
depth()
click to toggle source
# File lib/markdown_to_rspec/to_rspec/item/base.rb, line 7 def depth raise NotImplementedError end
indent(line, indent_length = 2, indent_string = ' ')
click to toggle source
insert indentation with depth in mind. For example, if depth is 2, indext(“foo bar”) #=> “ foo bar”
@param [String] line The string of the line to insert the indent. @param [Intger] indent_length The number of indented characters. @param [String] indent_string Character to be used for indentation.
@return [String] Indented string. ex) depth: 2
# File lib/markdown_to_rspec/to_rspec/item/base.rb, line 34 def indent(line, indent_length = 2, indent_string = ' ') line.dup.prepend(indent_string * indent_length * depth) end
parent()
click to toggle source
# File lib/markdown_to_rspec/to_rspec/item/base.rb, line 15 def parent raise NotImplementedError end