Class: SolutionType
- Inherits:
-
Object
- Object
- SolutionType
- Defined in:
- lib/libowl/solution_types.rb
Overview
Solution types used when communicating with the distributor
Constant Summary collapse
- @@num_aliases =
Used for auto-incremented alias numbers
0
Instance Attribute Summary collapse
-
#data_uri ⇒ Object
Returns the value of attribute data_uri.
-
#type_alias ⇒ Object
Returns the value of attribute type_alias.
Instance Method Summary collapse
-
#initialize(uri, type_alias = -1)) ⇒ SolutionType
constructor
A new instance of SolutionType.
Constructor Details
#initialize(uri, type_alias = -1)) ⇒ SolutionType
Returns a new instance of SolutionType.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/libowl/solution_types.rb', line 12 def initialize(uri, type_alias = -1) @data_uri = uri #Auto-increment to the next alias number if one wasn't explicitly provided if (type_alias >= 0) @type_alias = type_alias else @type_alias = @@num_aliases @@num_aliases += 1 end end |
Instance Attribute Details
#data_uri ⇒ Object
Returns the value of attribute data_uri.
6 7 8 |
# File 'lib/libowl/solution_types.rb', line 6 def data_uri @data_uri end |
#type_alias ⇒ Object
Returns the value of attribute type_alias.
6 7 8 |
# File 'lib/libowl/solution_types.rb', line 6 def type_alias @type_alias end |