struct NNTP::Context

Overview

Struct to hold the current group and article header information

Defined in:

nntp/context.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(group : Group | Nil, article : Header | Nil) #

[View source]

Instance Method Detail

def article : Header | Nil #

[View source]
def article=(article : Header | Nil) #

[View source]
def article? #

Will return true if #article_num is not nil and not 0


[View source]
def article_num : Int64 #

Will return the current article number. If no article number is set it will raise a NNTP::Error::NoArticleContext error. Check before access with #article_num?

client.article_num? # => true
client.article_num  # => 56910000

[View source]
def article_num? #

Will return true if #article_num is not nil and not 0


[View source]
def group : Group | Nil #

[View source]
def group=(group : Group | Nil) #

[View source]
def group? #

Will return true if #group is not nil


[View source]
def group_name : String #

[View source]
def message_id : String #

Will return the current article message id. If no article number is set it will raise a NNTP::Error::NoArticleContext error. Check before access with #message_id?

client.message_id? # => true
client.message_id  # => "YwGnYrShOtJaBfSzZlTkKbBh-1587103108703@nyuu"

[View source]
def message_id? #

Will return true if #article_num is not nil


[View source]