Class: SafeDb::Print
- Inherits:
-
QueryVerse
- Object
- Controller
- QueryVerse
- SafeDb::Print
- Defined in:
- lib/controller/query/print.rb
Overview
The print use case prints out a credential value without a line feed or any other contextual information.
Print is perfect for reading values from scripts or using unix like pipe behaviour to pass credentials to other commands.
Instance Attribute Summary collapse
-
#key_name ⇒ Object
writeonly
Sets the attribute key_name.
Instance Method Summary collapse
-
#query_verse ⇒ Object
Use the chapter and verse setup to read the parameter @key_name and print its corresponding value without a line feed or return.
Methods inherited from QueryVerse
Methods inherited from Controller
#check_post_conditions, #check_pre_conditions, #execute, #flow, #initialize, #open_remote_backend_location, #post_validation, #pre_validation, #read_verse, #set_verse, #update_verse
Constructor Details
This class inherits a constructor from SafeDb::Controller
Instance Attribute Details
#key_name=(value) ⇒ Object (writeonly)
Sets the attribute key_name
12 13 14 |
# File 'lib/controller/query/print.rb', line 12 def key_name=(value) @key_name = value end |
Instance Method Details
#query_verse ⇒ Object
Use the chapter and verse setup to read the parameter @key_name and print its corresponding value without a line feed or return.
16 17 18 19 20 |
# File 'lib/controller/query/print.rb', line 16 def query_verse() print @verse[ @key_name ] end |