123456789_123456789_123456789_123456789_123456789_

Class: Net::IMAP::ConnectionState

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, DataLite
Instance Chain:
self, DataLite
Inherits: Net::IMAP::DataLite
Defined in: lib/net/imap/connection_state.rb

Constant Summary

DataLite - Inherited

ARITY_ERROR, ATTRSET_ERROR, DUP_ERROR, TYPE_ERROR

Class Method Summary

DataLite - Inherited

.define

Defines a new Data class.

Instance Attribute Summary

Instance Method Summary

Class Method Details

.define(symbol, *attrs)

[ GitHub ]

  
# File 'lib/net/imap/connection_state.rb', line 6

def self.define(symbol, *attrs)
  symbol => Symbol
  state = super(*attrs)
  state.const_set :NAME, symbol
  state
end

Instance Attribute Details

#authenticated?Boolean (readonly)

[ GitHub ]

  
# File 'lib/net/imap/connection_state.rb', line 32

def authenticated?;     to_sym == :authenticated     end

#logout?Boolean (readonly)

[ GitHub ]

  
# File 'lib/net/imap/connection_state.rb', line 34

def logout?;            to_sym == :logout            end

#not_authenticated?Boolean (readonly)

[ GitHub ]

  
# File 'lib/net/imap/connection_state.rb', line 31

def not_authenticated?; to_sym == :not_authenticated end

#selected?Boolean (readonly)

[ GitHub ]

  
# File 'lib/net/imap/connection_state.rb', line 33

def selected?;          to_sym == :selected          end

Instance Method Details

#deconstruct

[ GitHub ]

  
# File 'lib/net/imap/connection_state.rb', line 17

def deconstruct; [symbol, *super] end

#deconstruct_keys(names)

[ GitHub ]

  
# File 'lib/net/imap/connection_state.rb', line 19

def deconstruct_keys(names)
  hash = super
  hash[:symbol] = symbol if names.nil? || names.include?(:symbol)
  hash[:name]   = name   if names.nil? || names.include?(:name)
  hash
end

#name

[ GitHub ]

  
# File 'lib/net/imap/connection_state.rb', line 14

def name;   self.class::NAME.name end

#symbol Also known as: #to_sym

[ GitHub ]

  
# File 'lib/net/imap/connection_state.rb', line 13

def symbol; self.class::NAME      end

#to_h(&block)

[ GitHub ]

  
# File 'lib/net/imap/connection_state.rb', line 26

def to_h(&block)
  hash = deconstruct_keys(nil)
  block ? hash.to_h(&block) : hash
end

#to_sym

Alias for #symbol.

[ GitHub ]

  
# File 'lib/net/imap/connection_state.rb', line 15

alias to_sym symbol