Class: Lorj::Accounts

Inherits:
Object show all
Defined in:
lib/lorj_account.rb

Overview

Simple List of accounts class.

Instance Method Summary collapse

Constructor Details

#initializeAccounts

Class to query FORJ Accounts list.



27
28
29
# File 'lib/lorj_account.rb', line 27

def initialize
  @account_path = File.join(PrcLib.data_path, 'accounts')
end

Instance Method Details

#dumpObject



31
32
33
34
35
36
37
38
39
# File 'lib/lorj_account.rb', line 31

def dump
  return [] unless File.directory?(@account_path)

  accounts = []
  Dir.foreach(@account_path) do |x|
    accounts << x unless x.match(/^\..?$/)
  end
  accounts
end