Class: Stash::Wrapper::Size

Inherits:
Object
  • Object
show all
Includes:
XML::Mapping
Defined in:
lib/stash/wrapper/size.rb

Overview

Mapping for <st:size>

Instance Method Summary collapse

Constructor Details

#initialize(bytes:) ⇒ Size

Creates a new Stash::Wrapper::Size

Parameters:

  • bytes (Integer) —

    the size in bytes



16
17
18
19
# File 'lib/stash/wrapper/size.rb', line 16

def initialize(bytes:)
  self.size = bytes
  self.unit = SizeUnit::BYTE
end