Class: Pliney::MachO::Reader
- Inherits:
-
Object
- Object
- Pliney::MachO::Reader
- Defined in:
- lib/pliney/macho.rb
Direct Known Subclasses
CommonLCReader, CommonMachHeaderReader, CommonSectionReader, DylibStructReader, FatArchReader, FatHeaderReader
Instance Attribute Summary collapse
-
#fh ⇒ Object
readonly
Returns the value of attribute fh.
-
#startpos ⇒ Object
readonly
Returns the value of attribute startpos.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(f) ⇒ Reader
constructor
A new instance of Reader.
- #parse ⇒ Object
- #rewind ⇒ Object
Constructor Details
#initialize(f) ⇒ Reader
Returns a new instance of Reader.
144 145 146 147 |
# File 'lib/pliney/macho.rb', line 144 def initialize(f) @fh = f @startpos = @fh.pos end |
Instance Attribute Details
#fh ⇒ Object (readonly)
Returns the value of attribute fh.
136 137 138 |
# File 'lib/pliney/macho.rb', line 136 def fh @fh end |
#startpos ⇒ Object (readonly)
Returns the value of attribute startpos.
136 137 138 |
# File 'lib/pliney/macho.rb', line 136 def startpos @startpos end |
Class Method Details
.parse(f) ⇒ Object
138 139 140 141 142 |
# File 'lib/pliney/macho.rb', line 138 def self.parse(f) ob = new(f) ob.parse() return ob end |
Instance Method Details
#parse ⇒ Object
149 150 151 |
# File 'lib/pliney/macho.rb', line 149 def parse() @fh.pos = @startpos end |
#rewind ⇒ Object
153 154 155 |
# File 'lib/pliney/macho.rb', line 153 def rewind() @fh.pos = @startpos end |