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.
106 107 108 109 |
# File 'lib/app_info/dsym.rb', line 106 def initialize(file, size = 0) @file = file @size = size end |
Instance Method Details
#cpu_name ⇒ Object
111 112 113 |
# File 'lib/app_info/dsym.rb', line 111 def cpu_name @file.cpusubtype end |
#cpu_type ⇒ Object
115 116 117 |
# File 'lib/app_info/dsym.rb', line 115 def cpu_type @file.cputype end |
#header ⇒ Object
134 135 136 |
# File 'lib/app_info/dsym.rb', line 134 def header @header ||= @file.header end |
#size(humanable = false) ⇒ Object
123 124 125 126 127 |
# File 'lib/app_info/dsym.rb', line 123 def size(humanable = false) return Util.size_to_humanable(@size) if humanable @size end |
#to_h ⇒ Object
138 139 140 141 142 143 144 145 146 147 |
# File 'lib/app_info/dsym.rb', line 138 def to_h { uuid: uuid, type: type, cpu_name: cpu_name, cpu_type: cpu_type, size: size, humanable_size: size(true) } end |
#type ⇒ Object
119 120 121 |
# File 'lib/app_info/dsym.rb', line 119 def type @file.filetype end |
#uuid ⇒ Object Also known as: debug_id
129 130 131 |
# File 'lib/app_info/dsym.rb', line 129 def uuid @file[:LC_UUID][0].uuid_string end |