Class: Kaui::Tag

Inherits:
KillBillClient::Model::Tag
  • Object
show all
Defined in:
app/models/kaui/tag.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.list_or_search(search_key = nil, offset = 0, limit = 10, options = {}) ⇒ Object


3
4
5
6
7
8
9
# File 'app/models/kaui/tag.rb', line 3

def self.list_or_search(search_key = nil, offset = 0, limit = 10, options = {})
  if search_key.present?
    find_in_batches_by_search_key(search_key, offset, limit, options)
  else
    find_in_batches(offset, limit, options)
  end
end

Instance Method Details

#<=>(tag) ⇒ Object


29
30
31
# File 'app/models/kaui/tag.rb', line 29

def <=>(tag)
  tag_definition_name.downcase <=> tag.tag_definition_name.downcase
end

#is_system_tag?Boolean

Returns:

  • (Boolean)

25
26
27
# File 'app/models/kaui/tag.rb', line 25

def is_system_tag?
  Kaui::TagDefinition(:id => tag_definition_id).is_system_tag?
end