class Circed::Repositories::ChannelRepository

Included Modules

Defined in:

circed/repositories/channel_repository.cr

Instance Method Summary

Instance methods inherited from module Circed::Core::Repository(Circed::Domain::Channel)

[]=(id : String, entity : T) : T []=, []?(id : String) : T | Nil []?, clear : Nil clear, delete(id : String) : T | Nil delete, each(& : T -> ) : Nil each, size : Int32 size

Instance Method Detail

def []=(id : String, entity : Domain::Channel) : Domain::Channel #

[View source]
def []?(id : String) : Domain::Channel | Nil #

[View source]
def add_member(channel_name : String, nickname : String, modes : Set(Char) = Set(Char).new) : Nil #

[View source]
def clear : Nil #

[View source]
def create_channel(name : String) : Domain::Channel #

Channel-specific operations


[View source]
def delete(id : String) : Domain::Channel | Nil #

[View source]
def each(& : Domain::Channel -> ) : Nil #
Description copied from module Enumerable(Circed::Domain::Channel)

Must yield this collection's elements to the block.


[View source]
def each_user_channel(nickname : String, & : Domain::Channel -> ) : Nil #

Query methods


[View source]
def find_user_channel_names(nickname : String) : Array(String) #

[View source]
def find_user_channels(nickname : String) : Array(Domain::Channel) #

[View source]
def part_user(channel_name : String, nickname : String) : Bool #

[View source]
def remove_user_from_all_channels(nickname : String) : Set(String) #

Bulk operations


[View source]
def rename_member(old_nickname : String, new_nickname : String) : Set(String) #

[View source]
def size : Int32 #
Description copied from module Enumerable(Circed::Domain::Channel)

Returns the number of elements in the collection.

[1, 2, 3, 4].size # => 4

[View source]
def user_in_channel?(channel_name : String, nickname : String) : Bool #

[View source]