Class: R2rb::Server

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

Class Method Summary collapse

Class Method Details

.<<(block) ⇒ Object



100
101
102
# File 'lib/R4rb/R2rb_eval.rb', line 100

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

.echo(block = nil) ⇒ Object



108
109
110
111
112
# File 'lib/R4rb/R2rb_eval.rb', line 108

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

.inObject



92
93
94
# File 'lib/R4rb/R2rb_eval.rb', line 92

def Server.in
  return @@in
end

.in=(block) ⇒ Object



96
97
98
# File 'lib/R4rb/R2rb_eval.rb', line 96

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

.outObject



104
105
106
# File 'lib/R4rb/R2rb_eval.rb', line 104

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