Sha256: 4e6d62ab326b798800c8137bde73a56571c8eb21975e8ec8b20f2a7f8921e544

Contents?: true

Size: 480 Bytes

Versions: 11

Compression:

Stored size: 480 Bytes

Contents

# frozen_string_literal: true

module Shark
  module FormService
    module Form
      class RatingScale < Element
        def values
          scale_start = element['scale_start'].to_i
          scale_end = element['scale_end'].to_i
          allow_no_information = element['allow_no_information']

          scale_values = (scale_start..scale_end).to_a
          scale_values << -1 if allow_no_information == true

          scale_values
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
bima-shark-sdk-3.1.1 lib/shark/form_service/form/rating_scale.rb
bima-shark-sdk-2.5.0 lib/shark/form_service/form/rating_scale.rb
bima-shark-sdk-3.1.0 lib/shark/form_service/form/rating_scale.rb
bima-shark-sdk-3.0.0 lib/shark/form_service/form/rating_scale.rb
bima-shark-sdk-2.4.4 lib/shark/form_service/form/rating_scale.rb
bima-shark-sdk-2.4.3 lib/shark/form_service/form/rating_scale.rb
bima-shark-sdk-2.4.2 lib/shark/form_service/form/rating_scale.rb
bima-shark-sdk-2.4.1 lib/shark/form_service/form/rating_scale.rb
bima-shark-sdk-2.4.0 lib/shark/form_service/form/rating_scale.rb
bima-shark-sdk-2.3.1 lib/shark/form_service/form/rating_scale.rb
bima-shark-sdk-2.3.0 lib/shark/form_service/form/rating_scale.rb