Class: RelatedWord

Inherits:
Object
  • Object
show all
Defined in:
lib/related_word.rb,
lib/related_word/version.rb

Defined Under Namespace

Classes: SemanticService, Service

Constant Summary collapse

VERSION =
'0.1.12'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service = :semantic) ⇒ RelatedWord

Returns a new instance of RelatedWord.



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

def initialize(service = :semantic)
  @service = service
end

Instance Attribute Details

#serviceObject (readonly)

Returns the value of attribute service.



4
5
6
# File 'lib/related_word.rb', line 4

def service
  @service
end

Instance Method Details

#find(word) ⇒ Object



10
11
12
# File 'lib/related_word.rb', line 10

def find(word)
  Service.get(service).find(word)
end