Sha256: 352bf3ddf0778f392e039f544f67fad7595c298f5f30fe7d38ebd4791f9577c5

Contents?: true

Size: 355 Bytes

Versions: 1

Compression:

Stored size: 355 Bytes

Contents

options(Thing, :located, :contained, :supported, :attached).default = :located
options(Thing, :itemized, :not_itemized)
set_default_for(Thing, :portable)

class Thing
  def parent=(entity)
    super
    if parent.kind_of?(Supporter)
      is :supported
    elsif parent.kind_of?(Container)
      is :contained
    else
      is :located
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gamefic-0.2.0 lib/gamefic/import/basics/entities/thing.rb