Module: TagEchidna::ActiveRecord

Defined in:
lib/tag_echidna/active_record.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



2
3
4
# File 'lib/tag_echidna/active_record.rb', line 2

def self.included(base)
  base.extend TagEchidna::ActiveRecord::ClassMethods
end

Instance Method Details

#tag_namesObject



15
16
17
# File 'lib/tag_echidna/active_record.rb', line 15

def tag_names
  @tag_names ||= TagEchidna::TagNames.new self
end

#tag_names=(names) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/tag_echidna/active_record.rb', line 19

def tag_names=(names)
  if names.is_a?(TagEchidna::TagNames)
    @tag_names = names
  else
    @tag_names = TagEchidna::TagNames.new_with_names self, names
  end
end