Class: Expressir::Model::Declarations::Rule
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 = {}) ⇒ Rule
Returns a new instance of Rule.
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# File 'lib/expressir/model/declarations/rule.rb', line 34
def initialize(options = {})
initialize_identifier(options)
@applies_to = options[:applies_to] || []
@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] || []
@where_rules = options[:where_rules] || []
@informal_propositions = options[:informal_propositions] || []
super
end
|
Instance Attribute Details
#applies_to ⇒ Array<Reference>
9
|
# File 'lib/expressir/model/declarations/rule.rb', line 9
model_attr_accessor :applies_to, 'Array<Reference>'
|
#constants ⇒ Array<Constant>
15
|
# File 'lib/expressir/model/declarations/rule.rb', line 15
model_attr_accessor :constants, 'Array<Constant>'
|
#entities ⇒ Array<Entity>
11
|
# File 'lib/expressir/model/declarations/rule.rb', line 11
model_attr_accessor :entities, 'Array<Entity>'
|
#functions ⇒ Array<Function>
13
|
# File 'lib/expressir/model/declarations/rule.rb', line 13
model_attr_accessor :functions, 'Array<Function>'
|
19
|
# File 'lib/expressir/model/declarations/rule.rb', line 19
model_attr_accessor :informal_propositions, 'Array<RemarkItem>'
|
#procedures ⇒ Array<Procedure>
14
|
# File 'lib/expressir/model/declarations/rule.rb', line 14
model_attr_accessor :procedures, 'Array<Procedure>'
|
#statements ⇒ Array<Statement>
17
|
# File 'lib/expressir/model/declarations/rule.rb', line 17
model_attr_accessor :statements, 'Array<Statement>'
|
12
|
# File 'lib/expressir/model/declarations/rule.rb', line 12
model_attr_accessor :subtype_constraints, 'Array<SubtypeConstraint>'
|
#types ⇒ Array<Type>
10
|
# File 'lib/expressir/model/declarations/rule.rb', line 10
model_attr_accessor :types, 'Array<Type>'
|
#variables ⇒ Array<Variable>
16
|
# File 'lib/expressir/model/declarations/rule.rb', line 16
model_attr_accessor :variables, 'Array<Variable>'
|
#where_rules ⇒ Array<WhereRule>
18
|
# File 'lib/expressir/model/declarations/rule.rb', line 18
model_attr_accessor :where_rules, 'Array<WhereRule>'
|
Instance Method Details
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# File 'lib/expressir/model/declarations/rule.rb', line 53
def children
[
*types,
*types.flat_map{|x| x.enumeration_items},
*entities,
*subtype_constraints,
*functions,
*procedures,
*constants,
*variables,
*where_rules,
*informal_propositions,
*
]
end
|