Module: PhpRuby::Io::Functions

Extended by:
Functions
Included in:
Functions
Defined in:
lib/php_ruby/io/functions.rb

Instance Method Summary collapse

Instance Method Details

#echo(*args) ⇒ Object



5
6
7
# File 'lib/php_ruby/io/functions.rb', line 5

def echo(*args)
  $stdout.write(args)
end

#file(fname) ⇒ Object



18
19
20
# File 'lib/php_ruby/io/functions.rb', line 18

def file(fname)
  IO.read(fname)
end


9
10
11
# File 'lib/php_ruby/io/functions.rb', line 9

def print_r(*args)
  pp(*args)
end

#sprintf(*args) ⇒ Object



13
14
15
16
# File 'lib/php_ruby/io/functions.rb', line 13

def sprintf(*args)
  format, *tokens = *args
  format % tokens
end