Class: PFM::Storage::Box

Inherits:
Object show all
Defined in:
scripts/01450 Systems/00200 Storage/00001 PFM_Storage/00002 Box.rb

Overview

Class responsive of storing various thing and holding some information about the storage

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(box_size, name, theme, content_overload = nil) ⇒ Box

Create a new box

Parameters:

  • box_size (Integer)

    size of the box

  • name (String)

    name of the box

  • theme (Integer)

    theme of the box

  • content_overload (Array) (defaults to: nil)

    content to force in this object



19
20
21
22
23
# File 'scripts/01450 Systems/00200 Storage/00001 PFM_Storage/00002 Box.rb', line 19

def initialize(box_size, name, theme, content_overload = nil)
  @content = content_overload || Array.new(box_size)
  @name = name
  @theme = theme
end

Instance Attribute Details

#contentArray<PFM::Pokemon> (readonly)

Content of the storage

Returns:



13
14
15
# File 'scripts/01450 Systems/00200 Storage/00001 PFM_Storage/00002 Box.rb', line 13

def content
  @content
end

#nameString

Name of the storage

Returns:



7
8
9
# File 'scripts/01450 Systems/00200 Storage/00001 PFM_Storage/00002 Box.rb', line 7

def name
  @name
end

#themeInteger

Theme of the storage

Returns:



10
11
12
# File 'scripts/01450 Systems/00200 Storage/00001 PFM_Storage/00002 Box.rb', line 10

def theme
  @theme
end