Class: Foobara::CommandConnector::Authenticator

Inherits:
Object
  • Object
show all
Defined in:
foobara-0.0.110/projects/command_connectors/src/authenticator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(symbol: nil, explanation: nil, &block) ⇒ Authenticator

Returns a new instance of Authenticator.



6
7
8
9
10
11
12
# File 'foobara-0.0.110/projects/command_connectors/src/authenticator.rb', line 6

def initialize(symbol: nil, explanation: nil, &block)
  symbol ||= Util.non_full_name_underscore(self.class).to_sym

  @symbol = symbol
  @block = block
  @explanation = explanation || symbol
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



4
5
6
# File 'foobara-0.0.110/projects/command_connectors/src/authenticator.rb', line 4

def block
  @block
end

#explanationObject (readonly)

Returns the value of attribute explanation.



4
5
6
# File 'foobara-0.0.110/projects/command_connectors/src/authenticator.rb', line 4

def explanation
  @explanation
end

#symbolObject (readonly)

Returns the value of attribute symbol.



4
5
6
# File 'foobara-0.0.110/projects/command_connectors/src/authenticator.rb', line 4

def symbol
  @symbol
end

Instance Method Details

#to_procObject



14
15
16
# File 'foobara-0.0.110/projects/command_connectors/src/authenticator.rb', line 14

def to_proc
  block
end