Class: BinData::SanitizedEndian

Inherits:
SanitizedParameter show all
Defined in:
lib/bindata/sanitize.rb

Overview


Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(endian) ⇒ SanitizedEndian

Returns a new instance of SanitizedEndian.



259
260
261
262
263
264
265
# File 'lib/bindata/sanitize.rb', line 259

def initialize(endian)
  unless [:little, :big].include?(endian)
    raise ArgumentError, "unknown value for endian '#{endian}'"
  end

  @endian = endian
end

Instance Attribute Details

#endianObject (readonly)

Returns the value of attribute endian.



267
268
269
# File 'lib/bindata/sanitize.rb', line 267

def endian
  @endian
end