Sha256: 75bb7a96e97816e53807c8e6e27a469dd7b2f7acafc74208afccb8321b8b3938

Contents?: true

Size: 491 Bytes

Versions: 12

Compression:

Stored size: 491 Bytes

Contents

module CrossOrigen
  class Headers
    # Returns the object that included the CrossOrigen module
    attr_reader :owner

    def initialize(owner)
      @owner = owner
    end

    # Returns a string representing the owner as a C header
    def owner_to_header(_options = {})
      Origen.compile("#{path_to_templates}/headers/default.h.erb", scope: owner)
    end

    private

    def path_to_templates
      "#{File.expand_path(File.dirname(__FILE__))}/../../templates"
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
cross_origen-1.4.0 lib/cross_origen/headers.rb
cross_origen-1.3.0 lib/cross_origen/headers.rb
cross_origen-1.2.3 lib/cross_origen/headers.rb
cross_origen-1.2.2 lib/cross_origen/headers.rb
cross_origen-1.2.1 lib/cross_origen/headers.rb
cross_origen-1.2.0 lib/cross_origen/headers.rb
cross_origen-1.1.0 lib/cross_origen/headers.rb
cross_origen-1.0.0 lib/cross_origen/headers.rb
cross_origen-0.7.0 lib/cross_origen/headers.rb
cross_origen-0.6.1 lib/cross_origen/headers.rb
cross_origen-0.6.0 lib/cross_origen/headers.rb
cross_origen-0.5.0 lib/cross_origen/headers.rb