Class: Moonrope::Authenticator
- Inherits:
-
Object
- Object
- Moonrope::Authenticator
- Defined in:
- lib/moonrope/authenticator.rb
Instance Attribute Summary collapse
-
#description ⇒ String
The description for the authenticator.
-
#doc ⇒ Bool
Whether or not the action should be documented.
-
#errors ⇒ Hash
readonly
The errors this authenticator can raise.
-
#friendly_name ⇒ String
The friendly name for the authenticator.
-
#headers ⇒ Hash
readonly
The headers that this authenticator uses.
-
#lookup ⇒ Proc
The lookup block.
-
#name ⇒ Symbol
readonly
The name of the authenticator.
-
#rules ⇒ Hash
readonly
The rules this authenticator provides.
Instance Method Summary collapse
-
#initialize(name, &block) ⇒ Authenticator
constructor
A new instance of Authenticator.
Constructor Details
#initialize(name, &block) ⇒ Authenticator
Returns a new instance of Authenticator.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/moonrope/authenticator.rb', line 6 def initialize(name, &block) @name = name @headers = {} @errors = {} @rules = {} if block_given? dsl = Moonrope::DSL::AuthenticatorDSL.new(self) dsl.instance_eval(&block) end end |
Instance Attribute Details
#description ⇒ String
Returns the description for the authenticator.
24 25 26 |
# File 'lib/moonrope/authenticator.rb', line 24 def description @description end |
#doc ⇒ Bool
Returns whether or not the action should be documented.
39 40 41 |
# File 'lib/moonrope/authenticator.rb', line 39 def doc @doc end |
#errors ⇒ Hash (readonly)
Returns the errors this authenticator can raise.
33 34 35 |
# File 'lib/moonrope/authenticator.rb', line 33 def errors @errors end |
#friendly_name ⇒ String
Returns the friendly name for the authenticator.
21 22 23 |
# File 'lib/moonrope/authenticator.rb', line 21 def friendly_name @friendly_name end |
#headers ⇒ Hash (readonly)
Returns the headers that this authenticator uses.
30 31 32 |
# File 'lib/moonrope/authenticator.rb', line 30 def headers @headers end |
#lookup ⇒ Proc
Returns the lookup block.
27 28 29 |
# File 'lib/moonrope/authenticator.rb', line 27 def lookup @lookup end |
#name ⇒ Symbol (readonly)
Returns the name of the authenticator.
18 19 20 |
# File 'lib/moonrope/authenticator.rb', line 18 def name @name end |
#rules ⇒ Hash (readonly)
Returns the rules this authenticator provides.
36 37 38 |
# File 'lib/moonrope/authenticator.rb', line 36 def rules @rules end |