Skip to content

Commit

Permalink
Moving if block to a single line
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurtis Rainbolt-Greene committed Jan 9, 2012
1 parent c3f6334 commit b8d1942
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/rocco.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit b8d1942

Please sign in to comment.