Class: Lab42::DataClass::Constraint

Inherits:
Object
  • Object
show all
Defined in:
lib/lab42/data_class/constraint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#functionObject (readonly)

Returns the value of attribute function.



7
8
9
# File 'lib/lab42/data_class/constraint.rb', line 7

def function
  @function
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/lab42/data_class/constraint.rb', line 7

def name
  @name
end

Instance Method Details

#call(value) ⇒ Object



9
10
11
# File 'lib/lab42/data_class/constraint.rb', line 9

def call(value)
  function.(value)
end

#to_sObject



13
14
15
# File 'lib/lab42/data_class/constraint.rb', line 13

def to_s
  "Constraint<#{name}>"
end