struct Wakdata::RecipeIngredient

Included Modules

Defined in:

wakdata/recipe_ingredient.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module Wakdata::With::Quantity

quantity : UInt32 quantity

Instance methods inherited from module Wakdata::With::RecipeId

recipe(item_types : Array(Wakdata::Recipe)) : Wakdata::Recipe | Nil recipe, recipe_id : UInt32 recipe_id

Instance methods inherited from module Wakdata::With::ItemId

item(items : Array(Wakdata::Item), jobItems : Array(Wakdata::JobItem)) : Wakdata::Item | Wakdata::JobItem | Nil
item(items : Array(Wakdata::Item)) : Wakdata::Item | Nil
item(jobItems : Array(Wakdata::JobItem)) : Wakdata::JobItem | Nil
item
, item_id : UInt32 item_id

Constructor Detail

def self.new(item_id : UInt32, recipe_id : UInt32, quantity : UInt32, ingredient_order : UInt8) #

[View source]
def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

def self.new(pull : JSON::PullParser) #

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

def self.from_bson(bson : BSON) #

NOTE See self.new.


Instance Method Detail

def [](value : String) #

[View source]
def ingredient_order : UInt8 #

def to_bson(bson = BSON.new) #

Converts to a BSON representation.

user = User.new name: "John"
bson = user.to_bson