Class: Quicopt::Block
- Inherits:
-
Object
- Object
- Quicopt::Block
- Defined in:
- lib/quicopt/model.rb
Overview
The variables of one subproblem, declared with Model#block.
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
The block's name.
-
#variables ⇒ Array<Variable>
readonly
Its variables, in the order given.
Instance Method Summary collapse
-
#initialize(name, variables) ⇒ Block
constructor
private
Declared with
Model#block, not built directly. -
#inspect ⇒ String
Name and members.
Constructor Details
#initialize(name, variables) ⇒ Block
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.
Declared with Model#block, not built directly.
1012 1013 1014 1015 1016 |
# File 'lib/quicopt/model.rb', line 1012 def initialize(name, variables) @name = name @variables = variables freeze end |
Instance Attribute Details
#name ⇒ String (readonly)
Returns the block's name.
1005 1006 1007 |
# File 'lib/quicopt/model.rb', line 1005 def name @name end |
#variables ⇒ Array<Variable> (readonly)
Returns its variables, in the order given.
1007 1008 1009 |
# File 'lib/quicopt/model.rb', line 1007 def variables @variables end |
Instance Method Details
#inspect ⇒ String
Returns name and members.
1019 1020 1021 |
# File 'lib/quicopt/model.rb', line 1019 def inspect "#<Quicopt::Block #{@name}: #{@variables.join(', ')}>" end |