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.
-
#key ⇒ String
A unique identififer for the algorithm.
-
#name ⇒ String
A friendly name for the algorithm.
Instance Method Summary collapse
-
#initialize(algo_hash) ⇒ Algorithm
constructor
A new instance of Algorithm.
Constructor Details
#initialize(algo_hash) ⇒ Algorithm
Returns a new instance of Algorithm.
4 5 6 7 8 |
# File 'lib/nexosis_api/algorithm.rb', line 4 def initialize(algo_hash) algo_hash.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
20 21 22 |
# File 'lib/nexosis_api/algorithm.rb', line 20 def description @description end |
#key ⇒ String
A unique identififer for the algorithm
12 13 14 |
# File 'lib/nexosis_api/algorithm.rb', line 12 def key @key end |
#name ⇒ String
A friendly name for the algorithm
16 17 18 |
# File 'lib/nexosis_api/algorithm.rb', line 16 def name @name end |