Permalink
Browse files

Moving if block to a single line

  • Loading branch information...
1 parent c3f6334 commit b8d19427f328cc32ebb9e897d60d0c741e7146a4 Kurtis Rainbolt-Greene committed Jan 9, 2012
Showing with 1 addition and 6 deletions.
  1. +1 −6 lib/rocco.rb
View
@@ -84,12 +84,7 @@ def initialize(filename, sources=[], options={})
# When `block` is given, it must read the contents of the file using
# whatever means necessary and return it as a string. With no `block`,
# the file is read to retrieve data.
- @data =
- if block_given?
- yield
- else
- File.read(filename)
- end
+ @data = if block_given? then yield else File.read(filename) end
defaults = {
:language => 'ruby',

0 comments on commit b8d1942

Please sign in to comment.