Class: Cassowary::EditConstraint

Inherits:
EditOrStayConstraint show all
Defined in:
lib/constraint/edit_or_stay_constraint.rb

Instance Attribute Summary collapse

Attributes inherited from EditOrStayConstraint

#variable

Attributes inherited from Constraint

#strength, #weight

Instance Method Summary collapse

Methods inherited from EditOrStayConstraint

#expression

Methods inherited from Constraint

#expression, #inequality?, #required?, #stay_constraint?

Constructor Details

#initialize(hash = {}) ⇒ EditConstraint

Returns a new instance of EditConstraint.



25
26
27
28
# File 'lib/constraint/edit_or_stay_constraint.rb', line 25

def initialize(hash = {})
  super
  self.value = hash[:value]
end

Instance Attribute Details

#valueObject

Returns the value of attribute value.



23
24
25
# File 'lib/constraint/edit_or_stay_constraint.rb', line 23

def value
  @value
end

Instance Method Details

#edit_constraint?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/constraint/edit_or_stay_constraint.rb', line 30

def edit_constraint?
  true
end