Class: Cassowary::Constraint
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
Returns the value of attribute strength.
5
6
7
|
# File 'lib/constraint.rb', line 5
def strength
@strength
end
|
Returns the value of attribute weight.
5
6
7
|
# File 'lib/constraint.rb', line 5
def weight
@weight
end
|
Instance Method Details
#edit_constraint? ⇒ Boolean
11
12
13
|
# File 'lib/constraint.rb', line 11
def edit_constraint?
false
end
|
#expression ⇒ Object
7
8
9
|
# File 'lib/constraint.rb', line 7
def expression
raise NotImplementedError, "my subclass should have implemented #expression"
end
|
#inequality? ⇒ Boolean
15
16
17
|
# File 'lib/constraint.rb', line 15
def inequality?
false
end
|
#required? ⇒ Boolean
19
20
21
|
# File 'lib/constraint.rb', line 19
def required?
strength.required?
end
|
#stay_constraint? ⇒ Boolean
23
24
25
|
# File 'lib/constraint.rb', line 23
def stay_constraint?
false
end
|