module EasyApiDoc::Configurable::ClassMethods
Public Instance Methods
all()
click to toggle source
# File lib/configurable.rb, line 12 def all root_node.map do |name, opts| new(name, opts) end end
config()
click to toggle source
# File lib/configurable.rb, line 23 def config Configuration.load end
config_path()
click to toggle source
Override me
# File lib/configurable.rb, line 28 def config_path [self.to_s.split("::").last.downcase] end
find(name)
click to toggle source
# File lib/configurable.rb, line 18 def find(name) name, attrs = root_node.find {|key, attrs| key.to_s == name.to_s } new(name, attrs) end
root_node()
click to toggle source
protected
# File lib/configurable.rb, line 34 def root_node node = self.config config_path.each do |n| node = node[n] end node end