Sha256: ecee24c81bc3a82e61a11147307940790035b9db71ef235e92b935bfa9add5cc

Contents?: true

Size: 894 Bytes

Versions: 2

Compression:

Stored size: 894 Bytes

Contents

# Warehouse::Item

```ruby
@item1 = Warehouse::Item.new('迷黑', '迷黑', 3, 250)
```

# Warehouse::Random

```ruby
@item1 = Warehouse::Item.new('迷黑', '迷黑', nil, 250)
@item2 = Warehouse::Item.new('迷黃', '迷黃', nil, 250)
@item3 = Warehouse::Item.new('迷綠', '迷綠', nil, 250)
@random_item = Warehouse::Random.new([@item1, @item2, @item3], 4)
@list = @random_item.fetch! # (Warehouse::List)
```

# Warehouse::List

```ruby
@item1 = Warehouse::Item.new('迷黑', '迷黑', 1, 250)
@item2 = Warehouse::Item.new('迷黃', '迷黃', 1, 250)
@item3 = Warehouse::Item.new('迷綠', '迷綠', 1, 250)
@list = Warehouse::List.new([@item1, @item2, @item3])

# 所有數量變兩倍 (會解壓縮 RandomItem)
@list *= 2

# 迷黑數量 + 1
@list += @item1

# 解壓 random item (回傳都是已經隨機好的品項)
@list = @random_item.items!

# 回傳 item
@list.find('迷黑') 
```

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
warehouse_items-0.3.0 README.md
warehouse_items-0.2.0 README.md