Sha256: 7154aaf8b85daf407d66ade90ade85ccd814e9ff02121008cc85bcc1902fa28f

Contents?: true

Size: 976 Bytes

Versions: 11

Compression:

Stored size: 976 Bytes

Contents

# frozen_string_literal: true

module Expressir
  module Liquid
    module Statements
      class RepeatDrop < ::Expressir::Liquid::StatementDrop
        include ::Expressir::Liquid::IdentifierDrop

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

        def bound1
          drop_klass_by_model(@model.bound1)
        end

        def bound2
          drop_klass_by_model(@model.bound2)
        end

        def increment
          drop_klass_by_model(@model.increment)
        end

        def while_expression
          drop_klass_by_model(@model.while_expression)
        end

        def until_expression
          drop_klass_by_model(@model.until_expression)
        end

        def statements
          return [] unless @model.statements

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
expressir-2.1.10 lib/expressir/liquid/statements/repeat_drop.rb
expressir-2.1.9 lib/expressir/liquid/statements/repeat_drop.rb
expressir-2.1.8 lib/expressir/liquid/statements/repeat_drop.rb
expressir-2.1.7 lib/expressir/liquid/statements/repeat_drop.rb
expressir-2.1.6 lib/expressir/liquid/statements/repeat_drop.rb
expressir-2.1.5 lib/expressir/liquid/statements/repeat_drop.rb
expressir-2.1.4 lib/expressir/liquid/statements/repeat_drop.rb
expressir-2.1.3 lib/expressir/liquid/statements/repeat_drop.rb
expressir-2.1.2 lib/expressir/liquid/statements/repeat_drop.rb
expressir-2.1.1 lib/expressir/liquid/statements/repeat_drop.rb
expressir-2.1.0 lib/expressir/liquid/statements/repeat_drop.rb