Class: ChangelogGenerator::TextFormatter
- Inherits:
-
Object
- Object
- ChangelogGenerator::TextFormatter
- Defined in:
- lib/changelog_generator/text_formatter.rb
Class Method Summary collapse
-
.text_formatter(string) ⇒ Object
- Determines the type of text formatting wanted from the provided parameter string for formatting Params:
string -
The string representation of the text formatting desired.
- Determines the type of text formatting wanted from the provided parameter string for formatting Params:
Class Method Details
.text_formatter(string) ⇒ Object
Determines the type of text formatting wanted from the provided parameter string for formatting Params:
string-
The string representation of the text formatting desired
7 8 9 10 11 12 13 14 15 |
# File 'lib/changelog_generator/text_formatter.rb', line 7 def self.text_formatter(string) if string.casecmp("slack") == 0 return :slack elsif string.casecmp("markdown") == 0 or string.casecmp("md") == 0 or string.casecmp("mkd") == 0 or string.casecmp("mdown") == 0 return :markdown else abort "Invalid formatting style provided. Available formatting options are: Slack, or Markdown" end end |