Skip to content

Instantly share code, notes, and snippets.

/inner_module.rb Secret

Created February 21, 2018 13:30
Show Gist options
  • Save anonymous/8827267302ae6498cff3bf6ded9f37c6 to your computer and use it in GitHub Desktop.
Save anonymous/8827267302ae6498cff3bf6ded9f37c6 to your computer and use it in GitHub Desktop.
attr_accessor failure
module Outer
module Inner
attr_reader :special
def self.do_something
@special = 'my value'
end
end
end
require_relative 'inner_module'
module Outer
Inner.do_something
p Inner.special
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment