Class: TestsDoc::File
- Inherits:
-
Struct
- Object
- Struct
- TestsDoc::File
- Defined in:
- lib/tests_doc/file.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#output ⇒ Object
Returns the value of attribute output.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options
5 6 7 |
# File 'lib/tests_doc/file.rb', line 5 def end |
#output ⇒ Object
Returns the value of attribute output
5 6 7 |
# File 'lib/tests_doc/file.rb', line 5 def output @output end |
#path ⇒ Object
Returns the value of attribute path
5 6 7 |
# File 'lib/tests_doc/file.rb', line 5 def path @path end |
Instance Method Details
#write_if_changed ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/tests_doc/file.rb', line 7 def write_if_changed ensure_folder if write_output? ::File.open(path, 'w+') do |f| f.write(output) end end end |