Class: BinaryPList::Parser::ObjectReaders::Null

Inherits:
Base
  • Object
show all
Defined in:
lib/binary_plist/parser/object_readers/null.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from BinaryPList::Parser::ObjectReaders::Base

Class Method Details

.reads?(marker) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/binary_plist/parser/object_readers/null.rb', line 9

def self.reads?(marker)
  (0..0).include?(marker)
end

Instance Method Details

#read(marker) ⇒ Object



13
14
15
16
17
# File 'lib/binary_plist/parser/object_readers/null.rb', line 13

def read(marker)
  raise UnsupportedMarkerError, marker unless self.class.reads?(marker)

  nil
end