method
set_input
v1_8_7_72 -
Show latest stable
- Class:
RubyLex
set_input(io, p = nil, &block)public
io functions
# File lib/irb/ruby-lex.rb, line 78
def set_input(io, p = nil, &block)
@io = io
if p.respond_to?(:call)
@input = p
elsif block_given?
@input = block
else
@input = Proc.new{@io.gets}
end
end Related methods
- Instance methods
- char_no
- each_top_level_statement
- eof?
- get_read
- get_readed
- getc
- getc
- getc_of_rests
- getc_of_rests
- gets
- gets
- identify_comment
- identify_comment
- identify_gvar
- identify_gvar
- identify_here_document
- identify_here_document
- identify_identifier
- identify_identifier
- identify_number
- identify_number
- identify_quotation
- identify_quotation
- identify_string
- identify_string
- initialize_input
- lex
- lex
- lex_init
- lex_init
- lex_int2
- lex_int2
- line_no
- peek
- peek
- peek_equal?
- peek_equal?
- peek_match?
- prompt
- read_escape
- read_escape
- set_input
- set_prompt
- skip_inner_expression
- token
- token
- ungetc
- ungetc
- Class methods
- debug?
- debug?
- new
- new
- Private methods
-
buf_input