Class: NexosisApi::Session
- Inherits:
-
Object
- Object
- NexosisApi::Session
- Defined in:
- lib/nexosis_api/session.rb
Overview
Class for parsing the results of a session based request
Direct Known Subclasses
Instance Attribute Summary collapse
-
#dataSetName ⇒ String
the dataset used in this session.
-
#endDate ⇒ DateTime
The end date of analysis in this session.
-
#extraParameters ⇒ Hash
reserved for future extensions.
-
#is_estimate ⇒ Boolean
Is this session an estimate only session.
-
#links ⇒ Array of NexosisApi::Link
associated hypermedia.
-
#sessionId ⇒ String
identifier for this sesssion.
-
#startDate ⇒ DateTime
The start date of analysis in this session.
-
#status ⇒ String
Is this session requested, estimated, started, or completed.
-
#statusHistory ⇒ Hash
Date and status of each status this session has entered.
-
#targetColumn ⇒ String
The column in the dataset for which this session ran predictions.
-
#type ⇒ String
What type of analysis was run during this session.
Instance Method Summary collapse
-
#initialize(sessionHash) ⇒ Session
constructor
A new instance of Session.
Constructor Details
permalink #initialize(sessionHash) ⇒ Session
Returns a new instance of Session.
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/nexosis_api/session.rb', line 4 def initialize(sessionHash) sessionHash.each do |k,v| if(k == "links") links = Array.new v.each do |l| links << NexosisApi::Link.new(l) end instance_variable_set("@#{k}", links) unless v.nil? elsif(k == "isEstimate") instance_variable_set("@is_estimate", v) unless v.nil? else instance_variable_set("@#{k}", v) unless v.nil? end end end |
Instance Attribute Details
permalink #dataSetName ⇒ String
the dataset used in this session
40 41 42 |
# File 'lib/nexosis_api/session.rb', line 40 def dataSetName @dataSetName end |
permalink #endDate ⇒ DateTime
The end date of analysis in this session
52 53 54 |
# File 'lib/nexosis_api/session.rb', line 52 def endDate @endDate end |
permalink #extraParameters ⇒ Hash
reserved for future extensions
36 37 38 |
# File 'lib/nexosis_api/session.rb', line 36 def extraParameters @extraParameters end |
permalink #is_estimate ⇒ Boolean
Is this session an estimate only session
60 61 62 |
# File 'lib/nexosis_api/session.rb', line 60 def is_estimate @is_estimate end |
permalink #links ⇒ Array of NexosisApi::Link
associated hypermedia
56 57 58 |
# File 'lib/nexosis_api/session.rb', line 56 def links @links end |
permalink #sessionId ⇒ String
identifier for this sesssion
20 21 22 |
# File 'lib/nexosis_api/session.rb', line 20 def sessionId @sessionId end |
permalink #startDate ⇒ DateTime
The start date of analysis in this session
48 49 50 |
# File 'lib/nexosis_api/session.rb', line 48 def startDate @startDate end |
permalink #status ⇒ String
Is this session requested, estimated, started, or completed
28 29 30 |
# File 'lib/nexosis_api/session.rb', line 28 def status @status end |
permalink #statusHistory ⇒ Hash
Date and status of each status this session has entered
32 33 34 |
# File 'lib/nexosis_api/session.rb', line 32 def statusHistory @statusHistory end |
permalink #targetColumn ⇒ String
The column in the dataset for which this session ran predictions
44 45 46 |
# File 'lib/nexosis_api/session.rb', line 44 def targetColumn @targetColumn end |
permalink #type ⇒ String
What type of analysis was run during this session
24 25 26 |
# File 'lib/nexosis_api/session.rb', line 24 def type @type end |