Class: DiffFolder
- Inherits:
-
Object
- Object
- DiffFolder
- Defined in:
- lib/macdiff/diff_folder.rb
Instance Attribute Summary collapse
-
#folder1 ⇒ Object
Returns the value of attribute folder1.
-
#folder2 ⇒ Object
Returns the value of attribute folder2.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#raw_output ⇒ Object
readonly
Returns the value of attribute raw_output.
Instance Method Summary collapse
- #debug ⇒ Object
-
#initialize(folder1, folder2) ⇒ DiffFolder
constructor
A new instance of DiffFolder.
- #run ⇒ Object
Constructor Details
#initialize(folder1, folder2) ⇒ DiffFolder
Returns a new instance of DiffFolder.
6 7 8 9 |
# File 'lib/macdiff/diff_folder.rb', line 6 def initialize(folder1 ,folder2) @folder1 = File.(folder1, Dir.pwd) @folder2 = File.(folder2, Dir.pwd) end |
Instance Attribute Details
#folder1 ⇒ Object
Returns the value of attribute folder1.
3 4 5 |
# File 'lib/macdiff/diff_folder.rb', line 3 def folder1 @folder1 end |
#folder2 ⇒ Object
Returns the value of attribute folder2.
3 4 5 |
# File 'lib/macdiff/diff_folder.rb', line 3 def folder2 @folder2 end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
4 5 6 |
# File 'lib/macdiff/diff_folder.rb', line 4 def output @output end |
#raw_output ⇒ Object (readonly)
Returns the value of attribute raw_output.
4 5 6 |
# File 'lib/macdiff/diff_folder.rb', line 4 def raw_output @raw_output end |
Instance Method Details
#debug ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/macdiff/diff_folder.rb', line 22 def debug puts '-' * 70 puts command.join(' ') puts '-' * 70 puts @raw_output puts '-' * 70 end |
#run ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/macdiff/diff_folder.rb', line 11 def run @raw_output = IO.popen(command) do |f| f.read # or raise end # NOT WORK, need to investigate # puts $?.success? # puts $?.exitstatus # $?.exitstatus == 0 || raise end |