Class: Expressir::Liquid::RepositoryDrop

Inherits:
ModelElementDrop show all
Defined in:
lib/expressir/liquid/repository_drop.rb

Instance Method Summary collapse

Methods inherited from ModelElementDrop

#_class, #file, #source

Constructor Details

#initialize(model, selected_schemas: nil, options: {}) ⇒ RepositoryDrop

rubocop:disable Lint/MissingSuper



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

def initialize(model, selected_schemas: nil, options: {}) # rubocop:disable Lint/MissingSuper
  @model = model
  @selected_schemas = selected_schemas
  @options = options
  super(model)
end

Instance Method Details

#schemasObject



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/expressir/liquid/repository_drop.rb', line 15

def schemas
  return [] unless @model.schemas

  @model.schemas.map do |item|
    ::Expressir::Liquid::Declarations::SchemaDrop.new(
      item,
      selected_schemas: @selected_schemas,
      options: @options,
    )
  end
end