Class: HiveSQL::Account

Inherits:
SqlBase
  • Object
show all
Defined in:
lib/hive_sql/models/account.rb

Instance Method Summary collapse

Methods inherited from SqlBase

#tx

Instance Method Details

#all_communitiesObject



44
45
46
# File 'lib/hive_sql/models/account.rb', line 44

def all_communities
  HiveSQL::Community.where('name IN(?) OR name IN(?)', roles.select(:community), subscriptions.select(:community))
end

#proxied_vsf_votes_totalObject



52
53
54
# File 'lib/hive_sql/models/account.rb', line 52

def proxied_vsf_votes_total
  JSON[proxied_vsf_votes].map(&:to_i).sum
end

#witness?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/hive_sql/models/account.rb', line 48

def witness?
  !!witness
end