module RRRMatey::StringModel::NamespacedKeyMethods

Public Instance Methods

item_name() click to toggle source
# File lib/rrrmatey/string_model/namespaced_key_methods.rb, line 4
def item_name()
    @item_name ||= name.underscore
end
item_name=(v) click to toggle source
# File lib/rrrmatey/string_model/namespaced_key_methods.rb, line 8
def item_name=(v)
    @item_name = v
end
namespace() click to toggle source
# File lib/rrrmatey/string_model/namespaced_key_methods.rb, line 12
def namespace()
    @namespace ||= item_name.pluralize
end
namespaced_key(id) click to toggle source
# File lib/rrrmatey/string_model/namespaced_key_methods.rb, line 16
def namespaced_key(id)
    "#{namespace}:#{id}"
end