Sha256: 88c10c90b3d9e66601ba7211ae46fef2d33272bfde30be133fa9644c4ae80bba
Contents?: true
Size: 522 Bytes
Versions: 7
Compression:
Stored size: 522 Bytes
Contents
class Class # Returns access to configuration parameters named after the class. # # Examples: # configatron.foo.bar = :bar # configatron.a.b.c.d = 'D' # # class Foo # end # # module A # module B # class C # end # end # end # # Foo.to_configatron.bar # => :bar # A::B::C.to_configatron.d # => 'D' def to_configatron name_spaces = self.name.split("::").collect{|s| s.methodize} configatron.send_with_chain(name_spaces) end end
Version data entries
7 entries across 7 versions & 4 rubygems