Class: Hermeneutics::Cli::ImapTools::Auth

Inherits:
CommandNamed show all
Defined in:
lib/hermeneutics/cli/imap/commands.rb

Direct Known Subclasses

AuthCramMD5, AuthLogin, AuthPlain

Constant Summary collapse

NAME =
:AUTHENTICATE

Instance Attribute Summary collapse

Attributes inherited from Command

#responses

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CommandNamed

#name

Methods inherited from Command

#add_response, #stream_lines

Constructor Details

#initialize(user, passwd) ⇒ Auth

Returns a new instance of Auth.



90
91
92
93
# File 'lib/hermeneutics/cli/imap/commands.rb', line 90

def initialize user, passwd
  super *[]
  @user, @passwd = user, passwd
end

Instance Attribute Details

#passwdObject (readonly)

Returns the value of attribute passwd.



88
89
90
# File 'lib/hermeneutics/cli/imap/commands.rb', line 88

def passwd
  @passwd
end

#userObject (readonly)

Returns the value of attribute user.



88
89
90
# File 'lib/hermeneutics/cli/imap/commands.rb', line 88

def user
  @user
end

Class Method Details

.find(type) ⇒ Object



82
83
84
85
# File 'lib/hermeneutics/cli/imap/commands.rb', line 82

def find type
  type = type.to_sym
  @sub.find { |c| c::TYPE == type }
end

.inherited(cls) ⇒ Object



79
80
81
# File 'lib/hermeneutics/cli/imap/commands.rb', line 79

def inherited cls
  @sub.push cls
end

Instance Method Details

#paramsObject



95
# File 'lib/hermeneutics/cli/imap/commands.rb', line 95

def params ; [ self.class::TYPE] ; end