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 =
[:new_name, :working_zone].freeze

Instance Attribute Summary

Attributes inherited from Setter

#computations

Attributes inherited from Field

#name, #parameter

Instance Method Summary collapse

Methods inherited from Setter

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

Methods inherited from Field

code_trees, count_variables, dependent_parameters, detect, detect_environment_variable, detect_parameter, each, parse!

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