Class: MarkdownMetrics::Elements::Inline::H2
- Inherits:
-
Base
- Object
- Base
- MarkdownMetrics::Elements::Inline::H2
show all
- Defined in:
- lib/markdown_metrics/elements/inline/h2.rb
Instance Attribute Summary
Attributes inherited from Base
#skip_lines_until
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#attributes, #initialize
Class Method Details
.match_element(line, next_line) ⇒ Object
7
8
9
|
# File 'lib/markdown_metrics/elements/inline/h2.rb', line 7
def self.match_element(line, next_line)
line.to_s.match(/^\#{2} .*/)
end
|
Instance Method Details
#name ⇒ Object
11
12
13
|
# File 'lib/markdown_metrics/elements/inline/h2.rb', line 11
def name
:h2
end
|
#value ⇒ Object
15
16
17
|
# File 'lib/markdown_metrics/elements/inline/h2.rb', line 15
def value
current_line.gsub(/^\#{2} /, '')
end
|