Class: GemSuit::CLI::Application::IOBuffer::BufferData

Inherits:
Object
  • Object
show all
Defined in:
lib/gem_suit/cli/application/io_buffer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#finishObject (readonly)

Returns the value of attribute finish.



36
37
38
# File 'lib/gem_suit/cli/application/io_buffer.rb', line 36

def finish
  @finish
end

#outputObject (readonly)

Returns the value of attribute output.



36
37
38
# File 'lib/gem_suit/cli/application/io_buffer.rb', line 36

def output
  @output
end

#startObject (readonly)

Returns the value of attribute start.



36
37
38
# File 'lib/gem_suit/cli/application/io_buffer.rb', line 36

def start
  @start
end

Instance Method Details

#<<(string) ⇒ Object



46
47
48
# File 'lib/gem_suit/cli/application/io_buffer.rb', line 46

def <<(string)
  @output << string
end

#record(&block) ⇒ Object



38
39
40
41
42
43
44
# File 'lib/gem_suit/cli/application/io_buffer.rb', line 38

def record(&block)
  @output = []
  @start  = Time.now
  yield
  @finish = Time.now
  self
end