Class: Expressir::Liquid::Declarations::FunctionDrop

Inherits:
Expressir::Liquid::DeclarationDrop show all
Includes:
IdentifierDrop
Defined in:
lib/expressir/liquid/declarations/function_drop.rb

Instance Method Summary collapse

Methods included from IdentifierDrop

#id, #initialize_identifier, #remark_items, #remarks, #source

Methods inherited from ModelElementDrop

#_class, #file, #source

Constructor Details

#initialize(model) ⇒ FunctionDrop

Returns a new instance of FunctionDrop.



9
10
11
12
13
# File 'lib/expressir/liquid/declarations/function_drop.rb', line 9

def initialize(model)
  @model = model
  initialize_identifier(@model)
  super
end

Instance Method Details

#constantsObject



67
68
69
70
71
72
73
# File 'lib/expressir/liquid/declarations/function_drop.rb', line 67

def constants
  return [] unless @model.constants

  @model.constants.map do |item|
    ::Expressir::Liquid::Declarations::ConstantDrop.new(item)
  end
end

#entitiesObject



35
36
37
38
39
40
41
# File 'lib/expressir/liquid/declarations/function_drop.rb', line 35

def entities
  return [] unless @model.entities

  @model.entities.map do |item|
    ::Expressir::Liquid::Declarations::EntityDrop.new(item)
  end
end

#functionsObject



51
52
53
54
55
56
57
# File 'lib/expressir/liquid/declarations/function_drop.rb', line 51

def functions
  return [] unless @model.functions

  @model.functions.map do |item|
    ::Expressir::Liquid::Declarations::FunctionDrop.new(item)
  end
end

#parametersObject



15
16
17
18
19
20
21
# File 'lib/expressir/liquid/declarations/function_drop.rb', line 15

def parameters
  return [] unless @model.parameters

  @model.parameters.map do |item|
    ::Expressir::Liquid::Declarations::ParameterDrop.new(item)
  end
end

#proceduresObject



59
60
61
62
63
64
65
# File 'lib/expressir/liquid/declarations/function_drop.rb', line 59

def procedures
  return [] unless @model.procedures

  @model.procedures.map do |item|
    ::Expressir::Liquid::Declarations::ProcedureDrop.new(item)
  end
end

#return_typeObject



23
24
25
# File 'lib/expressir/liquid/declarations/function_drop.rb', line 23

def return_type
  drop_klass_by_model(@model.return_type)
end

#statementsObject



83
84
85
86
87
88
89
# File 'lib/expressir/liquid/declarations/function_drop.rb', line 83

def statements
  return [] unless @model.statements

  @model.statements.map do |item|
    ::Expressir::Liquid::StatementDrop.new(item)
  end
end

#subtype_constraintsObject



43
44
45
46
47
48
49
# File 'lib/expressir/liquid/declarations/function_drop.rb', line 43

def subtype_constraints
  return [] unless @model.subtype_constraints

  @model.subtype_constraints.map do |item|
    ::Expressir::Liquid::Declarations::SubtypeConstraintDrop.new(item)
  end
end

#typesObject



27
28
29
30
31
32
33
# File 'lib/expressir/liquid/declarations/function_drop.rb', line 27

def types
  return [] unless @model.types

  @model.types.map do |item|
    ::Expressir::Liquid::Declarations::TypeDrop.new(item)
  end
end

#variablesObject



75
76
77
78
79
80
81
# File 'lib/expressir/liquid/declarations/function_drop.rb', line 75

def variables
  return [] unless @model.variables

  @model.variables.map do |item|
    ::Expressir::Liquid::Declarations::VariableDrop.new(item)
  end
end