Class: R2rb::Server

Inherits:
Object show all
Defined in:
lib/R4rb/R2rb_eval.rb

Class Method Summary collapse

Class Method Details

.<<(block) ⇒ Object



102
103
104
# File 'lib/R4rb/R2rb_eval.rb', line 102

def Server.<<(block)
  @@in << block
end

.echo(block = nil) ⇒ Object



110
111
112
113
114
# File 'lib/R4rb/R2rb_eval.rb', line 110

def Server.echo(block=nil)
  @@in=block if block
  R2rb << ".output<<-capture.output({"+@@in+"})"
  return (@@out < '.output').join("\n")
end

.inObject



94
95
96
# File 'lib/R4rb/R2rb_eval.rb', line 94

def Server.in
  return @@in
end

.in=(block) ⇒ Object



98
99
100
# File 'lib/R4rb/R2rb_eval.rb', line 98

def Server.in=(block)
  @@in=block
end

.outObject



106
107
108
# File 'lib/R4rb/R2rb_eval.rb', line 106

def Server.out
  return @@out.join("\n")
end