class ItemLibrary::BaseItem
Attributes
name[R]
Public Class Methods
new(name, properties)
click to toggle source
# File lib/natural_20/item_library/base_item.rb, line 6 def initialize(name, properties) @name = name @properties = properties end
Public Instance Methods
consumable?()
click to toggle source
# File lib/natural_20/item_library/base_item.rb, line 11 def consumable? !!@properties[:consumable] end
item?()
click to toggle source
# File lib/natural_20/item_library/base_item.rb, line 15 def item? true end
use!(battle, map, entity)
click to toggle source
# File lib/natural_20/item_library/base_item.rb, line 19 def use!(battle, map, entity); end
Protected Instance Methods
t(key, options = {})
click to toggle source
# File lib/natural_20/item_library/base_item.rb, line 23 def t(key, options = {}) I18n.t(key, **options) end