Class: AppInfo::DSYM::MachO
Overview
DSYM Mach-O
Instance Method Summary collapse
- #cpu_name ⇒ Object
- #cpu_type ⇒ Object
- #header ⇒ Object
-
#initialize(file, size = 0) ⇒ MachO
constructor
A new instance of MachO.
- #size(humanable = false) ⇒ Object
- #to_h ⇒ Object
- #type ⇒ Object
- #uuid ⇒ Object (also: #debug_id)
Constructor Details
#initialize(file, size = 0) ⇒ MachO
Returns a new instance of MachO.
103 104 105 106 |
# File 'lib/app_info/dsym.rb', line 103 def initialize(file, size = 0) @file = file @size = size end |
Instance Method Details
#cpu_name ⇒ Object
108 109 110 |
# File 'lib/app_info/dsym.rb', line 108 def cpu_name @file.cpusubtype end |
#cpu_type ⇒ Object
112 113 114 |
# File 'lib/app_info/dsym.rb', line 112 def cpu_type @file.cputype end |
#header ⇒ Object
131 132 133 |
# File 'lib/app_info/dsym.rb', line 131 def header @header ||= @file.header end |
#size(humanable = false) ⇒ Object
120 121 122 123 124 |
# File 'lib/app_info/dsym.rb', line 120 def size(humanable = false) return Util.size_to_humanable(@size) if humanable @size end |
#to_h ⇒ Object
135 136 137 138 139 140 141 142 143 144 |
# File 'lib/app_info/dsym.rb', line 135 def to_h { uuid: uuid, type: type, cpu_name: cpu_name, cpu_type: cpu_type, size: size, humanable_size: size(true) } end |
#type ⇒ Object
116 117 118 |
# File 'lib/app_info/dsym.rb', line 116 def type @file.filetype end |
#uuid ⇒ Object Also known as: debug_id
126 127 128 |
# File 'lib/app_info/dsym.rb', line 126 def uuid @file[:LC_UUID][0].uuid_string end |