Class: Biosphere::ActionContext
- Inherits:
-
Object
- Object
- Biosphere::ActionContext
- Defined in:
- lib/biosphere/terraformproxy.rb
Instance Attribute Summary collapse
-
#build_directory ⇒ Object
Returns the value of attribute build_directory.
-
#caller ⇒ Object
Returns the value of attribute caller.
-
#src_path ⇒ Object
Returns the value of attribute src_path.
Instance Method Summary collapse
- #find_file(filename) ⇒ Object
-
#initialize ⇒ ActionContext
constructor
A new instance of ActionContext.
- #method_missing(symbol, *args) ⇒ Object
- #state ⇒ Object
Constructor Details
#initialize ⇒ ActionContext
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_directory ⇒ Object
Returns the value of attribute build_directory.
10 11 12 |
# File 'lib/biosphere/terraformproxy.rb', line 10 def build_directory @build_directory end |
#caller ⇒ Object
Returns the value of attribute caller.
11 12 13 |
# File 'lib/biosphere/terraformproxy.rb', line 11 def caller @caller end |
#src_path ⇒ Object
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 |
#state ⇒ Object
18 19 20 |
# File 'lib/biosphere/terraformproxy.rb', line 18 def state return @caller.state.node end |