Sha256: 165c7c5475725d087fab7e834389825a2b5e20e94cb8811866939baaf1d2d9ba

Contents?: true

Size: 283 Bytes

Versions: 10

Compression:

Stored size: 283 Bytes

Contents

class Child < Amfetamine::Base
  @@children = [] # unrelated to relationships!
  attr_accessor :title, :description, :dummy_id

  belongs_to_resource :dummy

  def initialize(args={})
    @@children << self
    super(args)
  end

  def self.children
    @@children ||= []
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
amfetamine-0.2.12 spec/dummy/child.rb
amfetamine-0.2.11 spec/dummy/child.rb
amfetamine-0.2.9 spec/dummy/child.rb
amfetamine-0.2.7 spec/dummy/child.rb
amfetamine-0.2.6 spec/dummy/child.rb
amfetamine-0.2.5 spec/dummy/child.rb
amfetamine-0.2.4 spec/dummy/child.rb
amfetamine-0.2.3 spec/dummy/child.rb
amfetamine-0.2.1 spec/dummy/child.rb
amfetamine-0.2.0 spec/dummy/child.rb