Classes: Fixnum, Reac, String
construct reactive value from normal value (or proc).
construct reactive value from normal value (or proc)
86 87 88 89 90 91 92 93 94 95 96
# File 'lib/reac.rb', line 86 def Reac(obj=nil, &block) if block Reac::Proc.new(block) else if obj.is_a?(Array) Reac::Array.new(obj) else Reac::Value.new(obj) end end end