Class: Origami::Null
- Inherits:
-
Object
- Object
- Origami::Null
- Includes:
- Object
- Defined in:
- lib/origami/null.rb,
lib/origami/obfuscation.rb
Overview
Class representing Null Object.
Constant Summary collapse
- TOKENS =
:nodoc:
%w{ null }
- @@regexp =
Regexp.new(WHITESPACES + TOKENS.first)
Instance Attribute Summary
Attributes included from Object
#file_offset, #generation, #no, #objstm_offset, #parent
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Null
constructor
A new instance of Null.
-
#to_s(eol: $/) ⇒ Object
(also: #to_obfuscated_str)
:nodoc:.
-
#value ⇒ Object
Returns nil.
Methods included from Object
#cast_to, #copy, #document, #export, included, #indirect?, #indirect_parent, #logicalize, #logicalize!, #native_type, #numbered?, #post_build, #pre_build, #reference, #set_document, #set_indirect, skip_until_next_obj, #solve, #to_o, #type, typeof, #version_required, #xrefs
Constructor Details
#initialize ⇒ Null
Returns a new instance of Null.
35 36 37 |
# File 'lib/origami/null.rb', line 35 def initialize super end |
Class Method Details
.parse(stream, _parser = nil) ⇒ Object
:nodoc:
39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/origami/null.rb', line 39 def self.parse(stream, _parser = nil) #:nodoc: scanner = Parser.init_scanner(stream) offset = scanner.pos if scanner.skip(@@regexp).nil? raise InvalidNullObjectError end null = Null.new null.file_offset = offset null end |