Skip to content

Commit

Permalink
Deep indentation for IRLists.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Edgar committed Mar 29, 2010
1 parent 3333bfc commit 465f7d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/reversal/ir_list.rb
Expand Up @@ -2,13 +2,13 @@
module Reversal
class IRList < DelegateClass(Array)
def initialize(list)
@source = list.flatten
@source = list
super(@source)
end

def indent(amt = 2)
@source.map! do |item|
" " * amt + item.to_s
item.to_s.split("\n").map {|x| " " * amt + x.to_s}.join("\n")
end
end

Expand Down

0 comments on commit 465f7d9

Please sign in to comment.