Class: OdinFlex::MachO::Command
- Inherits:
-
Object
- Object
- OdinFlex::MachO::Command
- Includes:
- SectionTypes
- Defined in:
- lib/odinflex/mach-o.rb
Direct Known Subclasses
LC_BUILD_VERSION, LC_DYSYMTAB, LC_FUNCTION_STARTS, LC_LOAD_DYLIB, LC_LOAD_DYLINKER, LC_SEGMENT_64, LC_SOURCE_VERSION, LC_SYMTAB, LC_UNIXTHREAD, LC_UUID, LC_VERSION_MIN_MACOSX
Instance Attribute Summary collapse
-
#cmd ⇒ Object
readonly
Returns the value of attribute cmd.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Class Method Summary collapse
Instance Method Summary collapse
- #command? ⇒ Boolean
-
#initialize(cmd, size) ⇒ Command
constructor
A new instance of Command.
Methods included from SectionTypes
#dysymtab?, #section?, #segment?, #symtab?
Constructor Details
#initialize(cmd, size) ⇒ Command
Returns a new instance of Command.
78 79 80 81 |
# File 'lib/odinflex/mach-o.rb', line 78 def initialize cmd, size @cmd = cmd @size = size end |
Instance Attribute Details
#cmd ⇒ Object (readonly)
Returns the value of attribute cmd.
70 71 72 |
# File 'lib/odinflex/mach-o.rb', line 70 def cmd @cmd end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
70 71 72 |
# File 'lib/odinflex/mach-o.rb', line 70 def size @size end |
Class Method Details
.from_offset(offset, io) ⇒ Object
72 73 74 75 76 |
# File 'lib/odinflex/mach-o.rb', line 72 def self.from_offset offset, io io.seek offset, IO::SEEK_SET cmd, size = io.read(2 * 4).unpack('LL') from_io cmd, size, offset, io end |
Instance Method Details
#command? ⇒ Boolean
83 |
# File 'lib/odinflex/mach-o.rb', line 83 def command?; true; end |