struct Waknax::Event
- Waknax::Event
- Struct
- Value
- Object
Included Modules
- BSON::Serializable
- JSON::Serializable
- JSON::Serializable::Strict
- Waknax::With::Color
- Waknax::With::Id
- Waknax::With::ImageUrl
- YAML::Serializable
Defined in:
waknax/event.crConstructors
- .new(id : UInt16, type : String, mobile_info : String | Nil, color : String, date : Time, color_date : Union(String, Nil), recurring : Bool, background : Bool, background_url : Bool, day_background_url : Bool, border_background_url : Bool, image_url : String, name : String, boss_image_url : String, boss_name : String, boss_text : String, ephemeris : String, rubrikabrax : String, show_fest : Bool, fest_text : String, weight : UInt16)
- .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)
- #background : Bool
- #background_url : Bool
- #border_background_url : Bool
- #boss_image_url : String
- #boss_name : String
- #boss_text : String
- #color_date : Union(String, Nil)
- #date : Time
- #day_background_url : Bool
- #ephemeris : String
- #fest_text : String
- #mobile_info : String | Nil
- #name : String
- #recurring : Bool
- #rubrikabrax : String
- #show_fest : Bool
-
#to_bson(bson = BSON.new)
Converts to a BSON representation.
- #type : String
- #weight : UInt16
Instance methods inherited from module Waknax::With::ImageUrl
image_url : String
image_url
Instance methods inherited from module Waknax::With::Color
color : String
color
Instance methods inherited from module Waknax::With::Id
id : UInt16
id
Constructor Detail
def self.new(id : UInt16, type : String, mobile_info : String | Nil, color : String, date : Time, color_date : Union(String, Nil), recurring : Bool, background : Bool, background_url : Bool, day_background_url : Bool, border_background_url : Bool, image_url : String, name : String, boss_image_url : String, boss_name : String, boss_text : String, ephemeris : String, rubrikabrax : String, show_fest : Bool, fest_text : String, weight : UInt16)
#
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