Class: Expressir::Model::Declarations::Function
Overview
Specified in ISO 10303-11:2004
Instance Attribute Summary collapse
Attributes included from Identifier
#id, #remark_items, #remarks, #source
Attributes inherited from ModelElement
#parent
Instance Method Summary
collapse
#children_by_id, #find, from_hash, model_attr_accessor, model_attrs, #path, #reset_children_by_id, #to_hash, #to_liquid, #to_s
Constructor Details
#initialize(options = {}) ⇒ Function
Returns a new instance of Function.
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/expressir/model/declarations/function.rb', line 32
def initialize(options = {})
initialize_identifier(options)
@parameters = options[:parameters] || []
@return_type = options[:return_type]
@types = options[:types] || []
@entities = options[:entities] || []
@subtype_constraints = options[:subtype_constraints] || []
@functions = options[:functions] || []
@procedures = options[:procedures] || []
@constants = options[:constants] || []
@variables = options[:variables] || []
@statements = options[:statements] || []
super
end
|
Instance Attribute Details
#constants ⇒ Array<Constant>
16
|
# File 'lib/expressir/model/declarations/function.rb', line 16
model_attr_accessor :constants, 'Array<Constant>'
|
#entities ⇒ Array<Entity>
12
|
# File 'lib/expressir/model/declarations/function.rb', line 12
model_attr_accessor :entities, 'Array<Entity>'
|
#functions ⇒ Array<Function>
14
|
# File 'lib/expressir/model/declarations/function.rb', line 14
model_attr_accessor :functions, 'Array<Function>'
|
#parameters ⇒ Array<Parameter>
9
|
# File 'lib/expressir/model/declarations/function.rb', line 9
model_attr_accessor :parameters, 'Array<Parameter>'
|
#procedures ⇒ Array<Procedure>
15
|
# File 'lib/expressir/model/declarations/function.rb', line 15
model_attr_accessor :procedures, 'Array<Procedure>'
|
10
|
# File 'lib/expressir/model/declarations/function.rb', line 10
model_attr_accessor :return_type, 'DataType'
|
#statements ⇒ Array<Statement>
18
|
# File 'lib/expressir/model/declarations/function.rb', line 18
model_attr_accessor :statements, 'Array<Statement>'
|
13
|
# File 'lib/expressir/model/declarations/function.rb', line 13
model_attr_accessor :subtype_constraints, 'Array<SubtypeConstraint>'
|
#types ⇒ Array<Type>
11
|
# File 'lib/expressir/model/declarations/function.rb', line 11
model_attr_accessor :types, 'Array<Type>'
|
#variables ⇒ Array<Variable>
17
|
# File 'lib/expressir/model/declarations/function.rb', line 17
model_attr_accessor :variables, 'Array<Variable>'
|
Instance Method Details
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# File 'lib/expressir/model/declarations/function.rb', line 50
def children
[
*parameters,
*types,
*types.flat_map{|x| x.enumeration_items},
*entities,
*subtype_constraints,
*functions,
*procedures,
*constants,
*variables,
*
]
end
|