Method: Catche::Tag::Object#initialize

Defined in:
lib/catche/tag/object.rb

#initialize(model, object, options = {}) ⇒ Object

Returns a new instance of Object.



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/catche/tag/object.rb', line 53

def initialize(model, object, options={})
  @model = model
  @object = object

  association = options[:through]

  @options = {
    :resource_name      => Catche::Tag::Resource.singularize(@model),
    :collection_name    => Catche::Tag::Resource.pluralize(@model),
    :associations       => [association].flatten.compact,
    :bubble             => false,
    :expire_collection  => true
  }.merge(options)

  @associations = @options[:associations]
end