Class XMP::StringInputMethod
In: lib/irb/xmp.rb
Parent: IRB::InputMethod

Methods

eof?   gets   new   puts  

Public Class methods

[Source]

    # File lib/irb/xmp.rb, line 56
56:     def initialize
57:       super
58:       @exps = []
59:     end

Public Instance methods

[Source]

    # File lib/irb/xmp.rb, line 61
61:     def eof?
62:       @exps.empty?
63:     end

[Source]

    # File lib/irb/xmp.rb, line 65
65:     def gets
66:       while l = @exps.shift
67:         next if /^\s+$/ =~ l
68:         l.concat "\n"
69:         print @prompt, l
70:         break
71:       end
72:       l
73:     end

[Source]

    # File lib/irb/xmp.rb, line 75
75:     def puts(exps)
76:       @exps.concat exps.split(/\n/)
77:     end

[Validate]