Sha256: 3e8afcaa3a325bd90c758ec7b30a227659ff0aa489a82cdafb761ac631bf4b0c

Contents?: true

Size: 428 Bytes

Versions: 2

Compression:

Stored size: 428 Bytes

Contents

module Elf
  class ElfFile
    def build_policy(&builder)
      #TODO: Allow special 'default_generator' synthax instead of instance_exec
      Elf::Policy::inject_symbols(self)
      p = Elf::Policy.build(&builder)
      p.inject(self)
    end
  end
  def self.policy(&block)
    #TODO: optional arg?
    Elf::rewrite(ARGV[0]) do |file|
      file.build_policy do
        instance_exec(file,&block)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
elf-mithril-0.0.5 lib/mithril/policy/inject_policy.rb
elf-mithril-0.0.4 lib/mithril/policy/inject_policy.rb