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



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

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

#<=>(other) ⇒ Object



31
32
33
# File 'app/models/kaui/tag.rb', line 31

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

#system_tag?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'app/models/kaui/tag.rb', line 27

def system_tag?
  Kaui::TagDefinition(id: tag_definition_id).system_tag?
end