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
Returns a new instance of Convert.
10 11 12 13 |
# File 'lib/script2md.rb', line 10 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.
15 16 17 |
# File 'lib/script2md.rb', line 15 def language_type @language_type end |
#text ⇒ Object
Returns the value of attribute text.
15 16 17 |
# File 'lib/script2md.rb', line 15 def text @text end |
Instance Method Details
#convert ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/script2md.rb', line 17 def convert remove_shebang! code_into_codeblock! headling_comment_to_plaintext! format! self end |