Class: DataScienceTheater3000::Text2People

Inherits:
Object
  • Object
show all
Defined in:
lib/data_science_theater_3000/text2people.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Text2People

Specify a name or names and return parsed result as well as a best-guess for gender

Parameters:

  • can be array of name strings or a single name

API:

  • public



11
12
13
# File 'lib/data_science_theater_3000/text2people.rb', line 11

def initialize name
  @name = ActiveSupport::JSON.encode(name) 
end

Instance Attribute Details

#nameObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



5
6
7
# File 'lib/data_science_theater_3000/text2people.rb', line 5

def name
  @name
end

Instance Method Details

#resultHash

Returns information related to the provided name(s).

Returns:

  • information related to the provided name(s)

API:

  • public



17
18
19
# File 'lib/data_science_theater_3000/text2people.rb', line 17

def result
  dst_request.result
end