Class: Momo::MemberReference
- Defined in:
- lib/momo/memberreference.rb
Instance Method Summary collapse
- #[](index) ⇒ Object
-
#initialize(resource_name, member_name, stack) ⇒ MemberReference
constructor
A new instance of MemberReference.
- #member ⇒ Object
- #method_missing(name, *args, &block) ⇒ Object
Methods inherited from FuncCall
Constructor Details
#initialize(resource_name, member_name, stack) ⇒ MemberReference
Returns a new instance of MemberReference.
4 5 6 7 8 |
# File 'lib/momo/memberreference.rb', line 4 def initialize(resource_name, member_name, stack) @resource = resource_name @member = member_name super("Fn::GetAtt", stack, "#{resource_name}", "#{member_name}") end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
14 15 16 |
# File 'lib/momo/memberreference.rb', line 14 def method_missing(name, *args, &block) MemberReference.new(@resource, "#{@member}.#{name}", @stack) end |