lib/hanzo.rb in hanzo-0.6.2 vs lib/hanzo.rb in hanzo-1.0.0
- old
+ new
@@ -13,15 +13,15 @@
def self.run(command, fetch_output = false)
print(command, :green)
output = true
_run do
- if fetch_output
- output = `#{command}`
- else
- output = system(command)
- end
+ output = if fetch_output
+ `#{command}`
+ else
+ system(command)
+ end
end
output
end
@@ -66,8 +66,8 @@
end
end
class String
def unindent
- gsub(/^#{scan(/^\s*/).min_by { |l| l.length }}/, '')
+ gsub(/^#{scan(/^\s*/).min_by(&:length)}/, '')
end
end