Class: CraftingTable::Recipe
- Inherits:
-
Object
- Object
- CraftingTable::Recipe
- Defined in:
- lib/crafting_table/recipe.rb
Overview
A class representing a single recipe. A recipe has a name, one to n inputs, and one to n outputs.
Instance Attribute Summary collapse
- #input ⇒ Object readonly
- #name ⇒ Object readonly
- #output ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(name, input, output) ⇒ Recipe
constructor
Create a new recipe.
Constructor Details
#initialize(name, input, output) ⇒ Recipe
Create a new recipe.
28 29 30 |
# File 'lib/crafting_table/recipe.rb', line 28 def initialize(name, input, output) @name, @input, @output = name, input, output end |
Instance Attribute Details
#input ⇒ Object (readonly)
11 12 13 |
# File 'lib/crafting_table/recipe.rb', line 11 def input @input end |
#name ⇒ Object (readonly)
11 12 13 |
# File 'lib/crafting_table/recipe.rb', line 11 def name @name end |
#output ⇒ Object (readonly)
11 12 13 |
# File 'lib/crafting_table/recipe.rb', line 11 def output @output end |