Class: JSONSkooma::Vocabulary

Inherits:
Object
  • Object
show all
Defined in:
lib/json_skooma/vocabulary.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri, *keywords) ⇒ Vocabulary

Returns a new instance of Vocabulary.



7
8
9
10
# File 'lib/json_skooma/vocabulary.rb', line 7

def initialize(uri, *keywords)
  @kw_classes = keywords.map { |keyword| [keyword.key, keyword] }.to_h
  @uri = uri
end

Instance Attribute Details

#kw_classesObject (readonly)

Returns the value of attribute kw_classes.



5
6
7
# File 'lib/json_skooma/vocabulary.rb', line 5

def kw_classes
  @kw_classes
end

#uriObject (readonly)

Returns the value of attribute uri.



5
6
7
# File 'lib/json_skooma/vocabulary.rb', line 5

def uri
  @uri
end