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.
116 117 118 119 |
# File 'lib/app_info/dsym.rb', line 116 def initialize(file, size = 0) @file = file @size = size end |
Instance Method Details
#cpu_name ⇒ Object
121 122 123 |
# File 'lib/app_info/dsym.rb', line 121 def cpu_name @file.cpusubtype end |
#cpu_type ⇒ Object
125 126 127 |
# File 'lib/app_info/dsym.rb', line 125 def cpu_type @file.cputype end |
#header ⇒ Object
144 145 146 |
# File 'lib/app_info/dsym.rb', line 144 def header @header ||= @file.header end |
#size(humanable = false) ⇒ Object
133 134 135 136 137 |
# File 'lib/app_info/dsym.rb', line 133 def size(humanable = false) return Util.size_to_humanable(@size) if humanable @size end |
#to_h ⇒ Object
148 149 150 151 152 153 154 155 156 157 |
# File 'lib/app_info/dsym.rb', line 148 def to_h { uuid: uuid, type: type, cpu_name: cpu_name, cpu_type: cpu_type, size: size, humanable_size: size(true) } end |
#type ⇒ Object
129 130 131 |
# File 'lib/app_info/dsym.rb', line 129 def type @file.filetype end |
#uuid ⇒ Object Also known as: debug_id
139 140 141 |
# File 'lib/app_info/dsym.rb', line 139 def uuid @file[:LC_UUID][0].uuid_string end |