Class: AppInfo::DSYM::MachO
Overview
Constant Summary
Helper::HumanFileSize::FILE_SIZE_UNITS
Instance Method Summary
collapse
#file_to_human_size, #number_to_human_size
Constructor Details
#initialize(file, size = 0) ⇒ MachO
Returns a new instance of MachO.
121
122
123
124
|
# File 'lib/app_info/dsym.rb', line 121
def initialize(file, size = 0)
@file = file
@size = size
end
|
Instance Method Details
126
127
128
|
# File 'lib/app_info/dsym.rb', line 126
def cpu_name
@file.cpusubtype
end
|
130
131
132
|
# File 'lib/app_info/dsym.rb', line 130
def cpu_type
@file.cputype
end
|
149
150
151
|
# File 'lib/app_info/dsym.rb', line 149
def
@header ||= @file.
end
|
#size(human_size: false) ⇒ Object
138
139
140
141
142
|
# File 'lib/app_info/dsym.rb', line 138
def size(human_size: false)
return number_to_human_size(@size) if human_size
@size
end
|
153
154
155
156
157
158
159
160
161
162
|
# File 'lib/app_info/dsym.rb', line 153
def to_h
{
uuid: uuid,
type: type,
cpu_name: cpu_name,
cpu_type: cpu_type,
size: size,
human_size: size(human_size: true)
}
end
|
134
135
136
|
# File 'lib/app_info/dsym.rb', line 134
def type
@file.filetype
end
|
#uuid ⇒ Object
Also known as:
debug_id
144
145
146
|
# File 'lib/app_info/dsym.rb', line 144
def uuid
@file[:LC_UUID][0].uuid_string
end
|