Class: Packer::EnvVar

Inherits:
Object
  • Object
show all
Defined in:
lib/packer/envvar.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args) ⇒ Object

rubocop:disable Style/MethodMissingSuper



6
7
8
# File 'lib/packer/envvar.rb', line 6

def method_missing(method_name, *args)
  "{{env `#{method_name}`}}"
end

Instance Method Details

#respond_to?(symbol, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
18
# File 'lib/packer/envvar.rb', line 15

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

#respond_to_missing?(method_name, include_private = false) ⇒ Boolean

rubocop:enable Style/MethodMissingSuper

Returns:

  • (Boolean)


11
12
13
# File 'lib/packer/envvar.rb', line 11

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