Class: JSONSkooma::Vocabulary
- Inherits:
-
Object
- Object
- JSONSkooma::Vocabulary
- Defined in:
- lib/json_skooma/vocabulary.rb
Instance Attribute Summary collapse
-
#kw_classes ⇒ Object
readonly
Returns the value of attribute kw_classes.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize(uri, *keywords) ⇒ Vocabulary
constructor
A new instance of Vocabulary.
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_classes ⇒ Object (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 |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
5 6 7 |
# File 'lib/json_skooma/vocabulary.rb', line 5 def uri @uri end |