Sha256: 1a3e327759618735b521e406b2b1ebe53dc6565323de7b1cd75743c9c369c083

Contents?: true

Size: 515 Bytes

Versions: 23

Compression:

Stored size: 515 Bytes

Contents

# frozen_string_literal: true

require_relative 'concerns/slider'

module Quby
  module Compiler
    module Entities
      module Questions
        class IntegerQuestion < Question
          include Concerns::Slider

          def as_json(options = {})
            super.merge(
              minimum: minimum,
              maximum: maximum
            )
          end

          def size
            @size || 30
          end

          def step
            1
          end
        end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
quby-compiler-0.5.9 lib/quby/compiler/entities/questions/integer_question.rb
quby-compiler-0.5.8 lib/quby/compiler/entities/questions/integer_question.rb
quby-compiler-0.5.7 lib/quby/compiler/entities/questions/integer_question.rb
quby-compiler-0.5.6 lib/quby/compiler/entities/questions/integer_question.rb
quby-compiler-0.5.5 lib/quby/compiler/entities/questions/integer_question.rb
quby-compiler-0.5.4 lib/quby/compiler/entities/questions/integer_question.rb
quby-compiler-0.5.3 lib/quby/compiler/entities/questions/integer_question.rb
quby-compiler-0.5.2 lib/quby/compiler/entities/questions/integer_question.rb
quby-compiler-0.5.1 lib/quby/compiler/entities/questions/integer_question.rb
quby-compiler-0.5.0 lib/quby/compiler/entities/questions/integer_question.rb
quby-compiler-0.4.16 lib/quby/compiler/entities/questions/integer_question.rb
quby-compiler-0.4.15 lib/quby/compiler/entities/questions/integer_question.rb
quby-compiler-0.4.14 lib/quby/compiler/entities/questions/integer_question.rb
quby-compiler-0.4.13 lib/quby/compiler/entities/questions/integer_question.rb
quby-compiler-0.4.12 lib/quby/compiler/entities/questions/integer_question.rb
quby-compiler-0.4.11 lib/quby/compiler/entities/questions/integer_question.rb
quby-compiler-0.4.10 lib/quby/compiler/entities/questions/integer_question.rb
quby-compiler-0.4.9 lib/quby/compiler/entities/questions/integer_question.rb
quby-compiler-0.4.8 lib/quby/compiler/entities/questions/integer_question.rb
quby-compiler-0.4.7 lib/quby/compiler/entities/questions/integer_question.rb