Class: CSP::Algorithms::Ordering::NoOrder
- Inherits:
-
Object
- Object
- CSP::Algorithms::Ordering::NoOrder
- Defined in:
- lib/csp/algorithms/ordering/no_order.rb
Instance Attribute Summary collapse
-
#problem ⇒ Object
readonly
Returns the value of attribute problem.
Class Method Summary collapse
-
.for(problem:, dependency: nil) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument.
Instance Method Summary collapse
- #call(variables) ⇒ Object
-
#initialize(problem) ⇒ NoOrder
constructor
A new instance of NoOrder.
Constructor Details
#initialize(problem) ⇒ NoOrder
Returns a new instance of NoOrder.
13 14 15 |
# File 'lib/csp/algorithms/ordering/no_order.rb', line 13 def initialize(problem) @problem = problem end |
Instance Attribute Details
#problem ⇒ Object (readonly)
Returns the value of attribute problem.
7 8 9 |
# File 'lib/csp/algorithms/ordering/no_order.rb', line 7 def problem @problem end |
Class Method Details
.for(problem:, dependency: nil) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument
9 10 11 |
# File 'lib/csp/algorithms/ordering/no_order.rb', line 9 def self.for(problem:, dependency: nil) # rubocop:disable Lint/UnusedMethodArgument new(problem) end |
Instance Method Details
#call(variables) ⇒ Object
17 18 19 |
# File 'lib/csp/algorithms/ordering/no_order.rb', line 17 def call(variables) variables end |