Sha256: 6c8e607a6271c56fabc4d28e8cdbf95fd2e57364724bb81b3525995e01fd2d7f

Contents?: true

Size: 511 Bytes

Versions: 4

Compression:

Stored size: 511 Bytes

Contents

# Encoding: utf-8

module Packer
  class Macro
    # rubocop:disable Style/MethodMissingSuper
    def method_missing(method_name, *args)
      name = method_name.to_s.slice(0,1).capitalize + method_name.to_s.slice(1..-1)
      "{{ .#{name} }}"
    end
    # rubocop:enable Style/MethodMissingSuper

    def respond_to_missing?(method_name, include_private = false)
      true
    end

    def respond_to?(symbol, include_private=false)
      # We literally respond to everything...
      true
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
packer-config-1.6.5 lib/packer/macro.rb
packer-config-1.6.4 lib/packer/macro.rb
packer-config-1.6.3 lib/packer/macro.rb
packer-config-1.6.2 lib/packer/macro.rb