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.
122 123 124 125 126 127 128 |
# File 'lib/terrafying/generator.rb', line 122 def initialize( ref:, idx: ) @ref = ref @idx = idx end |
Instance Method Details
#realise ⇒ Object
130 131 132 |
# File 'lib/terrafying/generator.rb', line 130 def realise "#{@ref.realise}[#{@idx}]" end |