Class: Procedo::Procedure::Attribute

Inherits:
Setter show all
Defined in:
lib/procedo/procedure/attribute.rb

Overview

An Attribute defines an information to complete

Constant Summary collapse

TYPES =
%i[new_name working_zone new_container new_group new_variant killable identification_number].freeze

Instance Attribute Summary

Attributes inherited from Setter

#computations, #computed_filter, #filter

Attributes inherited from Field

#name, #parameter

Instance Method Summary collapse

Methods inherited from Setter

#accessible?, #add_computation, #depend_on?, #hidden?, #scope_hash

Constructor Details

#initialize(parameter, name, options = {}) ⇒ Attribute

Returns a new instance of Attribute.


7
8
9
10
11
12
# File 'lib/procedo/procedure/attribute.rb', line 7

def initialize(parameter, name, options = {})
  super(parameter, name, options)
  unless TYPES.include?(@name)
    raise "Unknown attribute type for #{procedure_name}/#{parameter_name}: " + @name.inspect
  end
end