Sha256: d7152bf89c0e1b63ff0f08542fbd3bf6a08ba9418cc17e7f53ce333861d77ad9

Contents?: true

Size: 265 Bytes

Versions: 4

Compression:

Stored size: 265 Bytes

Contents

module Degica
  class InventoryCollection < ObjectCollection
    def prompt
      "inventory"
    end

    def describe
      if empty?
        "You have no items in your inventory."
      else
        "[" + map(&:name).join(', ') + "]"
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
degica-1.0.3 lib/degica/collections/inventory_collection.rb
degica-1.0.2 lib/degica/collections/inventory_collection.rb
degica-1.0.1 lib/degica/collections/inventory_collection.rb
degica-1.0.0 lib/degica/collections/inventory_collection.rb