Class: Syntaxdb::Category

Inherits:
Object
  • Object
show all
Defined in:
lib/syntaxdb/category.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#category_idObject

Returns the value of attribute category_id.



5
6
7
# File 'lib/syntaxdb/category.rb', line 5

def category_id
  @category_id
end

Class Method Details

.concepts_category(options = {}) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/syntaxdb/category.rb', line 18

def concepts_category(options = {})
  language_permalink = options[:language_permalink]
  @category_id = options[:category_id]
  if @category_id && language_permalink
    Syntaxdb::Request.send_request(options, "/languages/#{language_permalink}/categories/#{category_id}/concepts")
  end
end

.language_categories(options = {}) ⇒ Object



11
12
13
14
15
16
# File 'lib/syntaxdb/category.rb', line 11

def language_categories(options = {})
  language_permalink = options[:language_permalink]
  if language_permalink
    Syntaxdb::Request.send_request(options, "/languages/#{language_permalink}/categories")
  end
end

Instance Method Details

#initalize(category_id) ⇒ Object



6
7
8
# File 'lib/syntaxdb/category.rb', line 6

def initalize(category_id)
  @category_id = category_id
end