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