Method: Fairy::Controller#def_pool_variable

Defined in:
lib/fairy/controller.rb

#def_pool_variable(vname, value = nil) ⇒ Object



761
762
763
764
765
766
767
768
# File 'lib/fairy/controller.rb', line 761

def def_pool_variable(vname, value = nil)
  # value が Hash で キー :block をもっていたら block と見なす.
  if value.__deep_connect_reference? && value.kind_of?(Hash) && value[:block]
  p = Context.create_proc(self, value[:block])
  value = p.call 
  end
  @pool_dict.def_variable(vname, value)
end