Sha256: bad716e9e84a7f7b0a459cca71aae6d38d9e33be34a204ebf49f538c21a006b7

Contents?: true

Size: 633 Bytes

Versions: 7

Compression:

Stored size: 633 Bytes

Contents

# frozen_string_literal: true

module Expressir
  module Liquid
    module DataTypes
      class SelectDrop < ::Expressir::Liquid::DataTypeDrop
        def initialize(model)
          @model = model
          super
        end

        def extensible
          @model.extensible
        end

        def generic_entity
          @model.generic_entity
        end

        def based_on
          drop_klass_by_model(@model.based_on)
        end

        def items
          return [] unless @model.items

          @model.items.map do |item|
            drop_klass_by_model(item)
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
expressir-2.1.6 lib/expressir/liquid/data_types/select_drop.rb
expressir-2.1.5 lib/expressir/liquid/data_types/select_drop.rb
expressir-2.1.4 lib/expressir/liquid/data_types/select_drop.rb
expressir-2.1.3 lib/expressir/liquid/data_types/select_drop.rb
expressir-2.1.2 lib/expressir/liquid/data_types/select_drop.rb
expressir-2.1.1 lib/expressir/liquid/data_types/select_drop.rb
expressir-2.1.0 lib/expressir/liquid/data_types/select_drop.rb