Sha256: 01cc035b187958604faca2a6747b3ebb5908db7d233e05e16c1b20c8737ffa37

Contents?: true

Size: 410 Bytes

Versions: 11

Compression:

Stored size: 410 Bytes

Contents

# frozen_string_literal: true

module Shark
  module FormService
    module Form
      class MultipleChoice < Element
        def values
          element['valid_values']
        end

        def more_on_choice?
          more_on_choice = attribute('more_on_choice')

          return values.include?(more_on_choice['value']) if more_on_choice.present?

          false
        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/multiple_choice.rb
bima-shark-sdk-2.5.0 lib/shark/form_service/form/multiple_choice.rb
bima-shark-sdk-3.1.0 lib/shark/form_service/form/multiple_choice.rb
bima-shark-sdk-3.0.0 lib/shark/form_service/form/multiple_choice.rb
bima-shark-sdk-2.4.4 lib/shark/form_service/form/multiple_choice.rb
bima-shark-sdk-2.4.3 lib/shark/form_service/form/multiple_choice.rb
bima-shark-sdk-2.4.2 lib/shark/form_service/form/multiple_choice.rb
bima-shark-sdk-2.4.1 lib/shark/form_service/form/multiple_choice.rb
bima-shark-sdk-2.4.0 lib/shark/form_service/form/multiple_choice.rb
bima-shark-sdk-2.3.1 lib/shark/form_service/form/multiple_choice.rb
bima-shark-sdk-2.3.0 lib/shark/form_service/form/multiple_choice.rb