Skip to content

Instantly share code, notes, and snippets.

@mayra-cabrera
Last active April 6, 2016 21:00
Show Gist options
  • Save mayra-cabrera/aeca147c4e5accbbb8b5132ea0ae4560 to your computer and use it in GitHub Desktop.
Save mayra-cabrera/aeca147c4e5accbbb8b5132ea0ae4560 to your computer and use it in GitHub Desktop.
VAL = 'Global'
 
module Foo
  VAL = 'Foo Local'
 
  class Bar
    def value1
      VAL
    end
  end
end
 
class Foo::Bar
  def value2
    VAL
  end
end

# Foo::Bar.new.value1
# Foo::Bar.new.value2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment