Class: Rvm2::Ui::Output::Fake::StringElements

Inherits:
StringIO
  • Object
show all
Defined in:
lib/plugins/rvm2/ui/output/fake.rb

Instance Method Summary collapse

Constructor Details

#initialize(parent, type) ⇒ StringElements

Returns a new instance of StringElements.



20
21
22
23
24
# File 'lib/plugins/rvm2/ui/output/fake.rb', line 20

def initialize(parent, type)
  @parent = parent
  @type = type
  super("","w")
end

Instance Method Details

#write(string) ⇒ Object



25
26
27
# File 'lib/plugins/rvm2/ui/output/fake.rb', line 25

def write(string)
  @parent.current.list << Element.new(string, @type)
end