module Hippo::Concerns::ApiPath::ClassMethods

Public Instance Methods

api_path(with_module: false) click to toggle source
# File lib/hippo/concerns/api_path.rb, line 9
def api_path(with_module: false)
    path = with_module ? to_s : to_s.demodulize
    path.underscore.dasherize
end
from_api_path(path) click to toggle source
# File lib/hippo/concerns/api_path.rb, line 14
def from_api_path(path)
    name = path.underscore.camelize.safe_constantize
end