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"
|
require "os/mac/architecture_list"
|
||||||
|
|
||||||
module MachOShim
|
module MachOShim
|
||||||
|
extend Forwardable
|
||||||
|
|
||||||
|
delegate [:dylib_id, :rpaths, :delete_rpath] => :macho
|
||||||
|
|
||||||
# @private
|
# @private
|
||||||
def macho
|
def macho
|
||||||
@macho ||= begin
|
@macho ||= begin
|
||||||
@ -56,18 +60,6 @@ module MachOShim
|
|||||||
lcs.map(&:name).map(&:to_s).uniq
|
lcs.map(&:name).map(&:to_s).uniq
|
||||||
end
|
end
|
||||||
|
|
||||||
def dylib_id
|
|
||||||
macho.dylib_id
|
|
||||||
end
|
|
||||||
|
|
||||||
def rpaths
|
|
||||||
macho.rpaths
|
|
||||||
end
|
|
||||||
|
|
||||||
def delete_rpath(rpath)
|
|
||||||
macho.delete_rpath(rpath)
|
|
||||||
end
|
|
||||||
|
|
||||||
def archs
|
def archs
|
||||||
mach_data.map { |m| m.fetch :arch }.extend(ArchitectureListExtension)
|
mach_data.map { |m| m.fetch :arch }.extend(ArchitectureListExtension)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user