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 passthrough :patch_ver, :name, :value passthrough :weight, :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