Class: BinData::SanitizedEndian
- Inherits:
-
SanitizedParameter
- Object
- SanitizedParameter
- BinData::SanitizedEndian
- Defined in:
- lib/bindata/sanitize.rb
Overview
Instance Attribute Summary collapse
-
#endian ⇒ Object
readonly
Returns the value of attribute endian.
Instance Method Summary collapse
-
#initialize(endian) ⇒ SanitizedEndian
constructor
A new instance of SanitizedEndian.
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
#endian ⇒ Object (readonly)
Returns the value of attribute endian.
267 268 269 |
# File 'lib/bindata/sanitize.rb', line 267 def endian @endian end |