Class: Expressir::Liquid::Declarations::SchemaDrop

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

Instance Method Summary collapse

Methods included from IdentifierDrop

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

Methods inherited from ModelElementDrop

#_class, #source

Constructor Details

#initialize(model) ⇒ SchemaDrop

Returns a new instance of SchemaDrop.



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

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

Instance Method Details

#constantsObject



33
34
35
36
37
38
39
# File 'lib/expressir/liquid/declarations/schema_drop.rb', line 33

def constants
  return [] unless @model.constants

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

#entitiesObject



49
50
51
52
53
54
55
# File 'lib/expressir/liquid/declarations/schema_drop.rb', line 49

def entities
  return [] unless @model.entities

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

#fileObject



15
16
17
# File 'lib/expressir/liquid/declarations/schema_drop.rb', line 15

def file
  @model.file
end

#functionsObject



65
66
67
68
69
70
71
# File 'lib/expressir/liquid/declarations/schema_drop.rb', line 65

def functions
  return [] unless @model.functions

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

#interfacesObject



25
26
27
28
29
30
31
# File 'lib/expressir/liquid/declarations/schema_drop.rb', line 25

def interfaces
  return [] unless @model.interfaces

  @model.interfaces.map do |item|
    ::Expressir::Liquid::Declarations::InterfaceDrop.new(item)
  end
end

#proceduresObject



81
82
83
84
85
86
87
# File 'lib/expressir/liquid/declarations/schema_drop.rb', line 81

def procedures
  return [] unless @model.procedures

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

#rulesObject



73
74
75
76
77
78
79
# File 'lib/expressir/liquid/declarations/schema_drop.rb', line 73

def rules
  return [] unless @model.rules

  @model.rules.map do |item|
    ::Expressir::Liquid::Declarations::RuleDrop.new(item)
  end
end

#subtype_constraintsObject



57
58
59
60
61
62
63
# File 'lib/expressir/liquid/declarations/schema_drop.rb', line 57

def subtype_constraints
  return [] unless @model.subtype_constraints

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

#typesObject



41
42
43
44
45
46
47
# File 'lib/expressir/liquid/declarations/schema_drop.rb', line 41

def types
  return [] unless @model.types

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

#versionObject



19
20
21
22
23
# File 'lib/expressir/liquid/declarations/schema_drop.rb', line 19

def version
  ::Expressir::Liquid::Declarations::SchemaVersionDrop.new(
    @model.version,
  )
end