Sha256: 79b51606ba6f194bd415fde4873632dade655d9aae8c0f40d28d23659660e276

Contents?: true

Size: 839 Bytes

Versions: 17

Compression:

Stored size: 839 Bytes

Contents

module Ecoportal
  module API
    class V2
      class Page
        class Component
          class SelectionOption < Common::Content::DoubleModel

            class << self
              def new_doc
                {
                  "id"         => new_uuid,
                  "weight"     => 9999
                }
              end
            end

            passkey     :id
            passforced  :patch_ver, default: 1
            passthrough :name, :value
            passthrough :weight
            passboolean :selected

            def numeric!
              self.value = block_given?? yield(value) : value.to_i
            end

            def text!
              self.value = block_given?? yield(value) : value.to_s
            end

          end
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
ecoportal-api-v2-0.8.26 lib/ecoportal/api/v2/page/component/selection_option.rb
ecoportal-api-v2-0.8.25 lib/ecoportal/api/v2/page/component/selection_option.rb
ecoportal-api-v2-0.8.24 lib/ecoportal/api/v2/page/component/selection_option.rb
ecoportal-api-v2-0.8.23 lib/ecoportal/api/v2/page/component/selection_option.rb
ecoportal-api-v2-0.8.22 lib/ecoportal/api/v2/page/component/selection_option.rb
ecoportal-api-v2-0.8.21 lib/ecoportal/api/v2/page/component/selection_option.rb
ecoportal-api-v2-0.8.20 lib/ecoportal/api/v2/page/component/selection_option.rb
ecoportal-api-v2-0.8.19 lib/ecoportal/api/v2/page/component/selection_option.rb
ecoportal-api-v2-0.8.18 lib/ecoportal/api/v2/page/component/selection_option.rb
ecoportal-api-v2-0.8.17 lib/ecoportal/api/v2/page/component/selection_option.rb
ecoportal-api-v2-0.8.16 lib/ecoportal/api/v2/page/component/selection_option.rb
ecoportal-api-v2-0.8.15 lib/ecoportal/api/v2/page/component/selection_option.rb
ecoportal-api-v2-0.8.14 lib/ecoportal/api/v2/page/component/selection_option.rb
ecoportal-api-v2-0.8.13 lib/ecoportal/api/v2/page/component/selection_option.rb
ecoportal-api-v2-0.8.12 lib/ecoportal/api/v2/page/component/selection_option.rb
ecoportal-api-v2-0.8.11 lib/ecoportal/api/v2/page/component/selection_option.rb
ecoportal-api-v2-0.8.10 lib/ecoportal/api/v2/page/component/selection_option.rb