Class: Trenni::Markdown::Generators::RSpec
- Inherits:
-
Trenni::Markdown::Generator
- Object
- Trenni::Markdown::Generator
- Trenni::Markdown::Generators::RSpec
- Defined in:
- lib/trenni/markdown/generators/rspec.rb
Instance Attribute Summary
Attributes inherited from Trenni::Markdown::Generator
Instance Method Summary collapse
Methods inherited from Trenni::Markdown::Generator
#append, #append_whitespace, #begin_parse, #close, #code, #end_parse, #indentation, #initialize, #nest, #open, #outdent, #paragraph, #whitespace
Constructor Details
This class inherits a constructor from Trenni::Markdown::Generator
Instance Method Details
#heading(level, text) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/trenni/markdown/generators/rspec.rb', line 25 def heading(level, text) case level when 1 then nest(level, "RSpec.describe #{text} do\n", "end\n") when 2 then nest(level, "it #{text.downcase.dump} do", "end\n") end end |