lib/quby/compiler/entities/questions/integer_question.rb in quby-compiler-0.4.3 vs lib/quby/compiler/entities/questions/integer_question.rb in quby-compiler-0.4.4
- old
+ new
@@ -1,22 +1,28 @@
# 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,
- step: 1, # fixed in v1.
- # defaultPosition: default_position # Needs discussion, can be number or string "hidden"
+ maximum: maximum
)
end
def size
@size || 30
+ end
+
+ def step
+ 1
end
end
end
end
end