class Lorj::Accounts

Simple List of accounts class.

Public Class Methods

new() click to toggle source

Class to query FORJ Accounts list.

# File lib/lorj_account.rb, line 27
def initialize
  @account_path = File.join(PrcLib.data_path, 'accounts')
end

Public Instance Methods

dump() click to toggle source
# 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