Class: Clothing

Inherits:
Item show all
Defined in:
lib/gamefic-standard/clothing/entities/clothing.rb

Direct Known Subclasses

Coat, Gloves, Hat, Pants, Shirt, Shoes

Instance Attribute Summary

Attributes inherited from Thing

#itemized, #locale_description, #portable

Attributes included from Grammar::Attributes

#gender, #plural

Attributes included from Edibility

#edible

Instance Method Summary collapse

Methods inherited from Thing

#attached=, #attached?, #itemized?, #parent=, #portable?, #room

Methods included from Grammar::Attributes

#person, #plural?

Methods included from Edibility

#edible?

Instance Method Details

#worn?Boolean

Returns:

  • (Boolean)


2
3
4
# File 'lib/gamefic-standard/clothing/entities/clothing.rb', line 2

def worn?
  self.parent.kind_of?(Character) and self.attached?
end