Class: SRSGame::Item
Overview
:doc:
Instance Attribute Summary (collapse)
-
- (Object) name
Returns the value of attribute name.
Instance Method Summary (collapse)
-
- (Item) initialize(params = {})
constructor
params:
:name
Displayed when the item is regarded.
-
- (Object) to_s
Name of the item.
Constructor Details
- (Item) initialize(params = {})
params:
:name |
Displayed when the item is regarded. (default: "Item") |
168 169 170 |
# File 'lib/srs_game.rb', line 168 def initialize(params = {}) @name = params[:name] or "Item" end |
Instance Attribute Details
- (Object) name
Returns the value of attribute name
164 165 166 |
# File 'lib/srs_game.rb', line 164 def name @name end |