Top Level Namespace

Defined Under Namespace

Modules: Muchdoge

Instance Method Summary collapse

Instance Method Details

#puts(*args) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/muchdoge.rb', line 4

def puts(*args)
	regex = /\e\[(\d+)(;\d+)*m/
	args.each do |arg|
		case arg
		when String
			$stdout.puts(arg.gsub(regex, '').dogeify)
		when Array
			arg.map{|e|e.gsub(regex, "") if e.is_a? String}.dogeify.each do |phrase|
				puts(phrase)
			end
		else 
			# this isn't working

			puts(arg.to_s)
			# $stdout.puts(arg)
		end
	end
	return nil
end