Class: Script2md::Convert
- Inherits:
-
Object
- Object
- Script2md::Convert
- Defined in:
- lib/script2md.rb
Instance Attribute Summary collapse
-
#language_type ⇒ Object
readonly
Returns the value of attribute language_type.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
- #convert ⇒ Object
-
#initialize(text, language_type: nil) ⇒ Convert
constructor
A new instance of Convert.
Constructor Details
#initialize(text, language_type: nil) ⇒ Convert
11 12 13 14 |
# File 'lib/script2md.rb', line 11 def initialize(text, language_type: nil) @text = text @language_type = language_type end |
Instance Attribute Details
#language_type ⇒ Object (readonly)
Returns the value of attribute language_type.
16 17 18 |
# File 'lib/script2md.rb', line 16 def language_type @language_type end |
#text ⇒ Object
Returns the value of attribute text.
16 17 18 |
# File 'lib/script2md.rb', line 16 def text @text end |
Instance Method Details
#convert ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/script2md.rb', line 18 def convert remove_shebang! code_into_codeblock! headling_comment_to_plaintext! format! self end |