Class: NexosisApi::Algorithm
- Inherits:
-
Object
- Object
- NexosisApi::Algorithm
- Defined in:
- lib/nexosis_api/algorithm.rb
Overview
Class to parse an individual algorithm
Instance Attribute Summary collapse
-
#description ⇒ String
Descriptive explanation of the algorithm implementation.
-
#name ⇒ String
A friendly name for the algorithm.
Instance Method Summary collapse
-
#initialize(algoHash) ⇒ Algorithm
constructor
A new instance of Algorithm.
Constructor Details
#initialize(algoHash) ⇒ Algorithm
Returns a new instance of Algorithm.
4 5 6 7 8 |
# File 'lib/nexosis_api/algorithm.rb', line 4 def initialize(algoHash) algoHash.each do |k,v| instance_variable_set("@#{k}", v) unless v.nil? end end |
Instance Attribute Details
#description ⇒ String
Descriptive explanation of the algorithm implementation
16 17 18 |
# File 'lib/nexosis_api/algorithm.rb', line 16 def description @description end |
#name ⇒ String
A friendly name for the algorithm
12 13 14 |
# File 'lib/nexosis_api/algorithm.rb', line 12 def name @name end |