Sha256: 851aa08bb983d5c1e4693dec10a2d08bf6dd145da49088b5e74fb7120dd78ed9
Contents?: true
Size: 1.57 KB
Versions: 21
Compression:
Stored size: 1.57 KB
Contents
module Expressir module Model class Function < ModelElement include Identifier model_attr_accessor :parameters model_attr_accessor :return_type model_attr_accessor :types model_attr_accessor :entities model_attr_accessor :subtype_constraints model_attr_accessor :functions model_attr_accessor :procedures model_attr_accessor :constants model_attr_accessor :variables model_attr_accessor :statements def initialize(options = {}) @id = options[:id] @remarks = options.fetch(:remarks, []) @remark_items = options.fetch(:remark_items, []) @source = options[:source] @parameters = options.fetch(:parameters, []) @return_type = options[:return_type] @types = options.fetch(:types, []) @entities = options.fetch(:entities, []) @subtype_constraints = options.fetch(:subtype_constraints, []) @functions = options.fetch(:functions, []) @procedures = options.fetch(:procedures, []) @constants = options.fetch(:constants, []) @variables = options.fetch(:variables, []) @statements = options.fetch(:statements, []) super end def enumeration_items types.flat_map{|x| x.enumeration_items} end def children [ *parameters, *types, *enumeration_items, *entities, *subtype_constraints, *functions, *procedures, *constants, *variables, *remark_items ] end end end end
Version data entries
21 entries across 21 versions & 1 rubygems