Sha256: ab74de1abf0eae108862bc96e5fc7ca1d355d34163b9c404a4581fd3834fa029

Contents?: true

Size: 237 Bytes

Versions: 17

Compression:

Stored size: 237 Bytes

Contents

class Sandwich < Attributor::Model
  attributes do
    attribute :name, String
    attribute :meat, Attributor::Polymorphic.on(:type) do
      given :chicken, Chicken
      given :turkey, Turkey
      given :duck, Duck
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
attributor-8.0 spec/support/polymorphics.rb
attributor-7.1 spec/support/polymorphics.rb
attributor-7.0 spec/support/polymorphics.rb
attributor-6.5 spec/support/polymorphics.rb
attributor-6.4 spec/support/polymorphics.rb
attributor-6.3 spec/support/polymorphics.rb
attributor-6.2 spec/support/polymorphics.rb
attributor-6.1 spec/support/polymorphics.rb
attributor-6.0 spec/support/polymorphics.rb
attributor-5.7 spec/support/polymorphics.rb
attributor-5.6 spec/support/polymorphics.rb
attributor-5.5 spec/support/polymorphics.rb
attributor-5.4 spec/support/polymorphics.rb
attributor-5.3 spec/support/polymorphics.rb
attributor-5.2.1 spec/support/polymorphics.rb
attributor-5.2.0 spec/support/polymorphics.rb
attributor-5.1.0 spec/support/polymorphics.rb