Sha256: df6023a63651e1a430a753ac3759629c89e9341ae0604b6a69838699c2e42a78
Contents?: true
Size: 915 Bytes
Versions: 8
Compression:
Stored size: 915 Bytes
Contents
class Remailer::Interpreter::StateProxy STATIC_CLASSES = [ String, Fixnum, NilClass, TrueClass, FalseClass, Float ].freeze def initialize(options, &block) @options = options instance_eval(&block) if (block_given?) end def parse(spec = nil, &block) @options[:parser] = Remailer::Interpreter.parser_for_spec(spec, &block) end def enter(&block) @options[:enter] ||= [ ] @options[:enter] << block end def interpret(response, &block) @options[:interpret] ||= [ ] @options[:interpret] << [ response, block ] end def default(&block) @options[:default] ||= [ ] @options[:default] << block end def leave(&block) @options[:leave] ||= [ ] @options[:leave] << block end def terminate(&block) @options[:terminate] ||= [ ] @options[:terminate] << block end protected def rebind(options) @options = options end end
Version data entries
8 entries across 8 versions & 1 rubygems