struct Wakdata::SubDefinition::Item::Item
- Wakdata::SubDefinition::Item::Item
- Struct
- Value
- Object
Included Modules
- BSON::Serializable
- JSON::Serializable
- JSON::Serializable::Strict
- Wakdata::With::Id
- Wakdata::With::Level
- Wakdata::With::Optional::GraphicParameters
- YAML::Serializable
Defined in:
wakdata/item.crConstructors
- .new(id : UInt32, level : UInt16, graphic_parameters : Wakdata::GraphicParameters | Nil, base_parameters : Wakdata::SubSubDefinition::Item::Item::BaseParameters, use_parameters : Wakdata::SubSubDefinition::Item::Item::UseParameters, shards_parameters : Wakdata::SubSubDefinition::Item::Item::ShardsParameters | Nil, sublimation_parameters : Wakdata::SubSubDefinition::Item::Item::SublimationParameters | Nil, properties : Array(UInt8) | Nil)
- .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)
- #base_parameters : Wakdata::SubSubDefinition::Item::Item::BaseParameters
- #properties : Array(UInt8) | Nil
- #shards_parameters : Wakdata::SubSubDefinition::Item::Item::ShardsParameters | Nil
- #sublimation_parameters : Wakdata::SubSubDefinition::Item::Item::SublimationParameters | Nil
-
#to_bson(bson = BSON.new)
Converts to a BSON representation.
- #use_parameters : Wakdata::SubSubDefinition::Item::Item::UseParameters
Instance methods inherited from module Wakdata::With::Optional::GraphicParameters
graphic_parameters : Wakdata::GraphicParameters | Nil
graphic_parameters
Instance methods inherited from module Wakdata::With::Level
level : UInt16
level
Instance methods inherited from module Wakdata::With::Id
id : UInt32
id
Constructor Detail
def self.new(id : UInt32, level : UInt16, graphic_parameters : Wakdata::GraphicParameters | Nil, base_parameters : Wakdata::SubSubDefinition::Item::Item::BaseParameters, use_parameters : Wakdata::SubSubDefinition::Item::Item::UseParameters, shards_parameters : Wakdata::SubSubDefinition::Item::Item::ShardsParameters | Nil, sublimation_parameters : Wakdata::SubSubDefinition::Item::Item::SublimationParameters | Nil, properties : Array(UInt8) | Nil)
#
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