Class: Etna::Filesystem::Mock::MockStat

Inherits:
Object
  • Object
show all
Defined in:
lib/etna/filesystem.rb

Instance Method Summary collapse

Constructor Details

#initialize(io) ⇒ MockStat

Returns a new instance of MockStat.



483
484
485
# File 'lib/etna/filesystem.rb', line 483

def initialize(io)
  @io = io
end

Instance Method Details

#sizeObject



487
488
489
# File 'lib/etna/filesystem.rb', line 487

def size
  @io.respond_to?(:length) ? @io.length : 0
end