Class: Terrafying::IndexRef
Instance Method Summary collapse
-
#initialize(ref:, idx:) ⇒ IndexRef
constructor
A new instance of IndexRef.
- #realise ⇒ Object
Methods inherited from Ref
#<=>, #==, #[], #[]=, #downcase, #fn_call, #slice, #split, #strip, #to_s, #to_str
Constructor Details
#initialize(ref:, idx:) ⇒ IndexRef
Returns a new instance of IndexRef.
127 128 129 130 131 132 133 |
# File 'lib/terrafying/generator.rb', line 127 def initialize( ref:, idx: ) @ref = ref @idx = idx end |
Instance Method Details
#realise ⇒ Object
135 136 137 |
# File 'lib/terrafying/generator.rb', line 135 def realise "#{@ref.realise}[#{@idx}]" end |