lib/zold/wallets.rb
def all
      DirItems.new(path).fetch(recursive: false).select do |f|
        file = File.join(@dir, f)
        basename = File.basename(f, Wallet::EXT)
        File.file?(file) &&
          !File.directory?(file) &&
          basename =~ /^[0-9a-fA-F]{16}$/ &&
          Id.new(basename).to_s == basename
      end.map { |w| Id.new(File.basename(w, Wallet::EXT)) }
    end
def all
      DirItems.new(path).fetch(recursive: false).select do |f|
        file = File.join(@dir, f)
        basename = File.basename(f, Wallet::EXT)
        File.file?(file) &&
          !File.directory?(file) &&
          basename =~ /^[0-9a-fA-F]{16}$/ &&
          Id.new(basename).to_s == basename
      end.map { |w| Id.new(File.basename(w, Wallet::EXT)) }
    end
def all DirItems . new ( path ) . fetch ( recursive : false ) . select do | f | file = File . join ( @dir , f ) basename = File . basename ( f , Wallet :: EXT ) File . file? ( file ) && ! File . directory? ( file ) && basename =~ / / && Id . new ( basename ) . to_s == basename end . map { | w | Id . new ( File . basename ( w , Wallet :: EXT ) ) } end
Returns the list of their IDs (as plain text)
Returns the list of their IDs ( as plain text )