class Device

Included Modules

Defined in:

models/device.cr:4
models/device.cr:9

Constructors

Class Method Summary

Instance Method Summary

Class methods inherited from module Subscriber::Device

on_preparation(message) on_preparation

Constructor Detail

def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

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

Class Method Detail

def self.registered_and_active?(mac : String, api_key : String) : Bool #

[View source]

Instance Method Detail

def active : Bool #

[View source]
def active=(active : Bool) #

[View source]
def active_switches #

[View source]
def api_key : ApiKey | Nil #

[View source]
def api_key! : ApiKey #

[View source]
def api_key=(child) #

[View source]
def created_at : Time | Nil #

def created_at! : Time #

def created_at=(created_at : Time | Nil) #

def id : Int64 | Nil #

[View source]
def id! : Int64 #

[View source]
def id=(id : Int64 | Nil) #

[View source]
def mac : String #

[View source]
def mac=(mac : String) #

[View source]
def name : String #

[View source]
def name=(name : String) #

[View source]
def send_auth_message #

[View source]
def send_restart_message #

[View source]
def send_setup_message #

[View source]
def switches #

[View source]
def topic_channel : String #

[View source]
def topic_channel=(topic_channel : String) #

[View source]
def updated_at : Time | Nil #

def updated_at! : Time #

def updated_at=(updated_at : Time | Nil) #

def user : User | Nil #

[View source]
def user! : User #

[View source]
def user=(parent : User) #

[View source]
def user_id : Int64 | Nil #

def user_id! : Int64 #

def user_id=(user_id : Int64 | Nil) #

def uuid : String #

[View source]
def uuid=(uuid : String) #

[View source]