Class: Acmesmith::ChallengeResponders::Base
- Inherits:
-
Object
- Object
- Acmesmith::ChallengeResponders::Base
- Defined in:
- lib/acmesmith/challenge_responders/base.rb
Instance Method Summary collapse
-
#cap_respond_all? ⇒ Boolean
Return ‘true’ if implements respond_all method.
-
#cleanup(domain, challenge) ⇒ Object
If cap_respond_all? is true, you don’t need to implement this method.
-
#cleanup_all(*domain_and_challenges) ⇒ Object
Clean up responses for the given challenges (1 or more).
-
#initialize ⇒ Base
constructor
A new instance of Base.
-
#respond(domain, challenge) ⇒ Object
If cap_respond_all? is true, you don’t need to implement this method.
-
#respond_all(*domain_and_challenges) ⇒ Object
Respond to the given challenges (1 or more).
-
#support?(type) ⇒ Boolean
Return supported challenge types.
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
14 15 |
# File 'lib/acmesmith/challenge_responders/base.rb', line 14 def initialize() end |
Instance Method Details
#cap_respond_all? ⇒ Boolean
Return ‘true’ if implements respond_all method.
10 11 12 |
# File 'lib/acmesmith/challenge_responders/base.rb', line 10 def cap_respond_all? false end |
#cleanup(domain, challenge) ⇒ Object
If cap_respond_all? is true, you don’t need to implement this method.
49 50 51 52 53 54 55 |
# File 'lib/acmesmith/challenge_responders/base.rb', line 49 def cleanup(domain, challenge) if cap_respond_all? cleanup_all([domain, challenge]) else raise NotImplementedError end end |
#cleanup_all(*domain_and_challenges) ⇒ Object
Clean up responses for the given challenges (1 or more).
29 30 31 32 33 34 35 36 37 |
# File 'lib/acmesmith/challenge_responders/base.rb', line 29 def cleanup_all(*domain_and_challenges) if cap_respond_all? raise NotImplementedError else domain_and_challenges.each do |dc| cleanup(*dc) end end end |
#respond(domain, challenge) ⇒ Object
If cap_respond_all? is true, you don’t need to implement this method.
40 41 42 43 44 45 46 |
# File 'lib/acmesmith/challenge_responders/base.rb', line 40 def respond(domain, challenge) if cap_respond_all? respond_all([domain, challenge]) else raise NotImplementedError end end |
#respond_all(*domain_and_challenges) ⇒ Object
Respond to the given challenges (1 or more).
18 19 20 21 22 23 24 25 26 |
# File 'lib/acmesmith/challenge_responders/base.rb', line 18 def respond_all(*domain_and_challenges) if cap_respond_all? raise NotImplementedError else domain_and_challenges.each do |dc| respond(*dc) end end end |
#support?(type) ⇒ Boolean
Return supported challenge types
5 6 7 |
# File 'lib/acmesmith/challenge_responders/base.rb', line 5 def support?(type) raise NotImplementedError end |