Sha256: 408797f67b0a2d22558f661486114810ed8bbfc3f73cc3fe35eaecafcb7780f9

Contents?: true

Size: 319 Bytes

Versions: 1

Compression:

Stored size: 319 Bytes

Contents

module BitShares
	class Account
		attr_reader :id, :name

		def initialize h
			@id = h['id'][/\d*$/]
			@name = h['name']
			@hash = h
		end

		def to_s() @name end

		def balance *ids
			Wallet[@name,*ids]
		end

		class << self
			def [] name
				new RPC.new('get_account_by_name',[name]).send
			end
		end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bitsharesws-0.0.4 lib/bitshares/account.rb