Skip to content

Instantly share code, notes, and snippets.

@MSch
Created May 30, 2012 09:41
Show Gist options
  • Save MSch/2835141 to your computer and use it in GitHub Desktop.
Save MSch/2835141 to your computer and use it in GitHub Desktop.
class Base
something_something :mappings
self.mappings = {}
end
class FirstChild < Base
self.mappings[:foo] = :bar
end
class SecondChild < Base
self.mappings[:foo] = :baz
end
Base.mappings # {}
FirstChild.mappings # {:foo=>:bar}
SecondChild.mappings # {:foo=>:baz}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment