Class: MarkdownToRspec::ToRspec::Item::Base
- Inherits:
-
Object
- Object
- MarkdownToRspec::ToRspec::Item::Base
show all
- Defined in:
- lib/markdown_to_rspec/to_rspec/item/base.rb
Instance Method Summary
collapse
Instance Method Details
#children ⇒ Object
11
12
13
|
# File 'lib/markdown_to_rspec/to_rspec/item/base.rb', line 11
def children
raise NotImplementedError
end
|
#convert ⇒ Object
19
20
21
|
# File 'lib/markdown_to_rspec/to_rspec/item/base.rb', line 19
def convert
raise NotImplementedError
end
|
#depth ⇒ Object
7
8
9
|
# File 'lib/markdown_to_rspec/to_rspec/item/base.rb', line 7
def depth
raise NotImplementedError
end
|
#indent(line, indent_length = 2, indent_string = ' ') ⇒ String
insert indentation with depth in mind. For example, if depth is 2, indext(“foo bar”) #=> “ foo bar”
ex) depth: 2
34
35
36
|
# 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 ⇒ Object
15
16
17
|
# File 'lib/markdown_to_rspec/to_rspec/item/base.rb', line 15
def parent
raise NotImplementedError
end
|