Permalink
Browse files

indentation change. re-aligned the private methods.

  • Loading branch information...
salemine committed May 4, 2012
1 parent 5fc1e35 commit 4b3265562fd1db71fe5862f9df5a768496602a40
Showing with 45 additions and 45 deletions.
  1. +12 −12 lib/sheet.rb
  2. +13 −13 lib/sheet/copy.rb
  3. +13 −13 lib/sheet/open.rb
  4. +7 −7 lib/sheet/write.rb
View
@@ -111,19 +111,19 @@ def process
end
private
- def open(name)
- Sheet::Open.new(name).open
- end
+ def open(name)
+ Sheet::Open.new(name).open
+ end
- def write(name)
- Sheet::Write.new(name).write
- end
+ def write(name)
+ Sheet::Write.new(name).write
+ end
- def list
- Sheet::List.new.list
- end
+ def list
+ Sheet::List.new.list
+ end
- def copy(name)
- Sheet::Copy.new(name).copy
- end
+ def copy(name)
+ Sheet::Copy.new(name).copy
+ end
end
View
@@ -15,22 +15,22 @@ def copy
end
private
- def check_if_sheet_exists_and_copy_sheet
- if Sheet.sheet_exists?(name)
- copy_sheet
- else
- Sheet.display("A sheet named #{name} could not be found")
- end
+ def check_if_sheet_exists_and_copy_sheet
+ if Sheet.sheet_exists?(name)
+ copy_sheet
+ else
+ Sheet.display("A sheet named #{name} could not be found")
end
+ end
- def copy_sheet
- copy_cmd = Sheet.copy_command
- if copy_cmd
- Sheet.exec("cat #{Sheet::sheet_path(name)} | #{copy_cmd}", true)
- else
- Sheet.display("Could not copy sheet, no copy command found")
- end
+ def copy_sheet
+ copy_cmd = Sheet.copy_command
+ if copy_cmd
+ Sheet.exec("cat #{Sheet::sheet_path(name)} | #{copy_cmd}", true)
+ else
+ Sheet.display("Could not copy sheet, no copy command found")
end
+ end
end
end
View
@@ -15,23 +15,23 @@ def open
end
private
- def process_sheet_content
- if !sheet_urls.empty? && cmd = Sheet.open_command
- sheet_urls.each do |url|
- Sheet.exec "#{cmd} #{url.chomp.sub(/url: /,'')}"
- end
- else
- Sheet.display sheet_content
+ def process_sheet_content
+ if !sheet_urls.empty? && cmd = Sheet.open_command
+ sheet_urls.each do |url|
+ Sheet.exec "#{cmd} #{url.chomp.sub(/url: /,'')}"
end
+ else
+ Sheet.display sheet_content
end
+ end
- def sheet_content
- @sheet_content ||= File.read(Sheet.sheet_path(name))
- end
+ def sheet_content
+ @sheet_content ||= File.read(Sheet.sheet_path(name))
+ end
- def sheet_urls
- @sheet_urls ||= sheet_content.split("\n").reject {|line| line !~ /^url:/ }
- end
+ def sheet_urls
+ @sheet_urls ||= sheet_content.split("\n").reject {|line| line !~ /^url:/ }
+ end
end
end
View
@@ -17,15 +17,15 @@ def write
end
private
- def editor_is_set?
- (editor = Sheet.editor) && editor.length > 0
- end
+ def editor_is_set?
+ (editor = Sheet.editor) && editor.length > 0
+ end
- def create_dir_if_doesnt_exist
- if ! Sheet.sheets_directory_exists?
- Dir.mkdir(Sheet.sheets_dir)
- end
+ def create_dir_if_doesnt_exist
+ if ! Sheet.sheets_directory_exists?
+ Dir.mkdir(Sheet.sheets_dir)
end
+ end
end
end

0 comments on commit 4b32655

Please sign in to comment.