Created
February 28, 2019 16:35
-
-
Save bougyman/2ae6f784c582726b15f6992d2c1e3212 to your computer and use it in GitHub Desktop.
Y
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
128 # @return [Object] The namespace parent of this class | |
129 def my_parent | |
130 # TODO: research a better way to accomplish this | |
131 @my_parent ||= Object.const_get(self.class.ancestors.first.to_s.split('::')[0..-2].join('::')) | |
132 end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment