Class: Biosphere::ActionContext

Inherits:
Object
  • Object
show all
Defined in:
lib/biosphere/terraformproxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeActionContext

Returns a new instance of ActionContext.



14
15
16
# File 'lib/biosphere/terraformproxy.rb', line 14

def initialize()

end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(symbol, *args) ⇒ Object



22
23
24
25
26
27
28
29
30
# File 'lib/biosphere/terraformproxy.rb', line 22

def method_missing(symbol, *args)
    #puts ">>>>>>>> method missing: #{symbol}, #{args}"

    if @caller.methods.include?(symbol)
        return @caller.method(symbol).call(*args)
    end

    super
end

Instance Attribute Details

#build_directoryObject

Returns the value of attribute build_directory.



10
11
12
# File 'lib/biosphere/terraformproxy.rb', line 10

def build_directory
  @build_directory
end

#callerObject

Returns the value of attribute caller.



11
12
13
# File 'lib/biosphere/terraformproxy.rb', line 11

def caller
  @caller
end

#src_pathObject

Returns the value of attribute src_path.



12
13
14
# File 'lib/biosphere/terraformproxy.rb', line 12

def src_path
  @src_path
end

Instance Method Details

#find_file(filename) ⇒ Object



32
33
34
35
# File 'lib/biosphere/terraformproxy.rb', line 32

def find_file(filename)
    src_path = Pathname.new(@src_path.last + "/" + File.dirname(filename)).cleanpath.to_s
    return src_path + "/" + File.basename(filename)
end

#stateObject



18
19
20
# File 'lib/biosphere/terraformproxy.rb', line 18

def state
    return @caller.state.node
end