Sha256: 8c54b63d5ffabe7273bcfef6bcb0135bcaaaffbcf4810b95e6cb54c9b4866051

Contents?: true

Size: 516 Bytes

Versions: 23

Compression:

Stored size: 516 Bytes

Contents

# frozen_string_literal: true

require_relative 'concerns/slider'

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

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

          def size
            @size || 30
          end

          def step
            0.01
          end
        end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
quby-compiler-0.4.6 lib/quby/compiler/entities/questions/float_question.rb
quby-compiler-0.4.5 lib/quby/compiler/entities/questions/float_question.rb
quby-compiler-0.4.4 lib/quby/compiler/entities/questions/float_question.rb