os/mac: Use delegation for Mach-O methods
This commit is contained in:
parent
54aca0d14f
commit
a8c4136e9e
@ -2,6 +2,10 @@ require "macho"
|
||||
require "os/mac/architecture_list"
|
||||
|
||||
module MachOShim
|
||||
extend Forwardable
|
||||
|
||||
delegate [:dylib_id, :rpaths, :delete_rpath] => :macho
|
||||
|
||||
# @private
|
||||
def macho
|
||||
@macho ||= begin
|
||||
@ -56,18 +60,6 @@ module MachOShim
|
||||
lcs.map(&:name).map(&:to_s).uniq
|
||||
end
|
||||
|
||||
def dylib_id
|
||||
macho.dylib_id
|
||||
end
|
||||
|
||||
def rpaths
|
||||
macho.rpaths
|
||||
end
|
||||
|
||||
def delete_rpath(rpath)
|
||||
macho.delete_rpath(rpath)
|
||||
end
|
||||
|
||||
def archs
|
||||
mach_data.map { |m| m.fetch :arch }.extend(ArchitectureListExtension)
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user