Class: Wordy::Account

Inherits:
Object
  • Object
show all
Defined in:
lib/wordy/account.rb

Class Method Summary collapse

Class Method Details

.balanceObject



4
5
6
7
8
# File 'lib/wordy/account.rb', line 4

def balance
  response = Cli.http_get(Wordy.wordy_url+'account/', {})
  return nil if response.empty?
  response['balance'].to_s.match(/[^0-9]?([0-9]+\.{0,1}[0-9]+)/)[1].to_f
end

.languagesObject



10
11
12
# File 'lib/wordy/account.rb', line 10

def languages
  Cli.http_get(Wordy.wordy_url+'languages/', {})
end