struct Wakdata::RecipeResult
- Wakdata::RecipeResult
- Struct
- Value
- Object
Included Modules
- BSON::Serializable
- JSON::Serializable
- JSON::Serializable::Strict
- Wakdata::With::RecipeId
- YAML::Serializable
Defined in:
wakdata/recipe_result.crConstructors
- .new(recipe_id : UInt32, producted_item_id : UInt32, product_order : UInt8, producted_item_quantity : UInt32)
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
- .new(pull : JSON::PullParser)
-
.new(bson : BSON)
Allocate an instance and copies data from a BSON struct.
Class Method Summary
-
.from_bson(bson : BSON)
NOTE See
self.new
.
Instance Method Summary
- #[](value : String)
- #product_order : UInt8
- #producted_item_id : UInt32
- #producted_item_quantity : UInt32
-
#to_bson(bson = BSON.new)
Converts to a BSON representation.
Instance methods inherited from module Wakdata::With::RecipeId
recipe(item_types : Array(Wakdata::Recipe)) : Wakdata::Recipe | Nil
recipe,
recipe_id : UInt32
recipe_id
Constructor Detail
def self.new(recipe_id : UInt32, producted_item_id : UInt32, product_order : UInt8, producted_item_quantity : UInt32)
#
def self.new(bson : BSON)
#
Allocate an instance and copies data from a BSON struct.
class User
include BSON::Serializable
property name : String
end
data = BSON.new
data["name"] = "John"
User.new(data)
Class Method Detail
Instance Method Detail
def to_bson(bson = BSON.new)
#
Converts to a BSON representation.
user = User.new name: "John"
bson = user.to_bson