Class: Shhh::App::PrivateKey::Detector
- Inherits:
-
Struct
- Object
- Struct
- Shhh::App::PrivateKey::Detector
- Defined in:
- lib/shhh/app/private_key/detector.rb
Overview
:nodoc:s
Class Attribute Summary collapse
-
.mapping ⇒ Object
readonly
Returns the value of attribute mapping.
Instance Attribute Summary collapse
-
#input_handler ⇒ Object
Returns the value of attribute input_handler.
-
#opts ⇒ Object
Returns the value of attribute opts.
Class Method Summary collapse
Instance Method Summary collapse
Class Attribute Details
.mapping ⇒ Object (readonly)
Returns the value of attribute mapping.
7 8 9 |
# File 'lib/shhh/app/private_key/detector.rb', line 7 def mapping @mapping end |
Instance Attribute Details
#input_handler ⇒ Object
Returns the value of attribute input_handler
4 5 6 |
# File 'lib/shhh/app/private_key/detector.rb', line 4 def input_handler @input_handler end |
#opts ⇒ Object
Returns the value of attribute opts
4 5 6 |
# File 'lib/shhh/app/private_key/detector.rb', line 4 def opts @opts end |
Class Method Details
.register(argument, proc) ⇒ Object
9 10 11 |
# File 'lib/shhh/app/private_key/detector.rb', line 9 def register(argument, proc) self.mapping[argument] = proc end |
Instance Method Details
#key ⇒ Object
14 15 16 17 18 19 |
# File 'lib/shhh/app/private_key/detector.rb', line 14 def key self.class.mapping.each_pair do |, key_proc| return key_proc.call(opts[], self) if opts[] end nil end |