module Tagliani

Constants

VERSION

Attributes

config[R]

Public Class Methods

configure() { |config| ... } click to toggle source
# File lib/tagliani.rb, line 17
def configure
  @config ||= Configuration.new
  yield(@config)
end
redis() click to toggle source
# File lib/tagliani.rb, line 22
def redis
  @redis ||= Redis.new(url: config.redis.url)
end

Public Instance Methods

taggable(options = {}) click to toggle source
# File lib/tagliani.rb, line 27
def taggable(options = {})
  Models.tagged << to_s

  class_attribute :_tag_kls, :_async, :_inherit

  self._tag_kls = options[:tag_kls] || "Tag"
  self._inherit = options[:inherit]
  self._async = options[:async]

  class_eval do
    include Concerns::Taggable
  end
end