Async::DiscordSourceAsyncDiscordChannels

class Channels

Represents a collection of channels.

Definitions

def each(&block)

Enumerate over each channel.

Signature

yields {|channel| ...}
parameter channel Channel

The channel.

Implementation

def each(&block)
	return to_enum unless block_given?
	
	self.value.each do |value|
		path = "/api/v10/channels/#{value[:id]}"
		
		yield Channel.new(@resource.with(path: path), value: value)
	end
end

def to_a

Convert this collection to an array.

Signature

returns Array(Channel)

an array of channels.

Implementation

def to_a
	each.to_a
end