Class: SetecAstronomy::CLI
- Inherits:
-
Thor
- Object
- Thor
- SetecAstronomy::CLI
- Defined in:
- lib/setec_astronomy/cli.rb
Instance Method Summary collapse
Instance Method Details
#copy(title) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/setec_astronomy/cli.rb', line 22 def copy(title) keepass = database([:file], [:gui]) entry = keepass.entry(title) resign("#{title} not found") if entry.nil? Clipboard.copy entry.password end |
#search(pattern) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/setec_astronomy/cli.rb', line 12 def search(pattern) keepass = database([:file], [:gui]) keepass.search(pattern).each do |match| puts "#{match.title} - #{match.notes}" end end |