Hi,

I found this method call while following the execution path of a
simple camping project, and I am not sure whether I interpreted it
correctly.

class A
  def initialize(options = nil)
    @options = options
  end
  def options
    @options ||= {script: 27}
  end
end

class B<A
  def initialize(*)
    super
    @lofa = options[:script]
  end
end
[4] pry(main)> B.new
=> #<B:0x007f51b1589490 @options={:script=>27}, @lofa=27>

I couldn't wrap my head around how "options" gets executed when its
definition does not allow any arguments but rewriting it gets the same
results.

[14] pry(main)> A.new.options.[](:script)
=> 27

Is it this simple or am I missing something else?

regards
attila