Class: Reve::Classes::WalletDivision

Inherits:
Object
  • Object
show all
Defined in:
lib/reve/classes.rb

Overview

Part of the CorporationSheet. Describes a division in the wallet Attributes

  • key ( Fixnum ) - Account key. Used for things like WalletBalance and such.

  • description ( String ) - Description of the WalletDivision

See Also CorporationSheet

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elem) ⇒ WalletDivision

:nodoc:



735
736
737
738
# File 'lib/reve/classes.rb', line 735

def initialize(elem) #:nodoc:
  @key = elem['accountKey'].to_i
  @description = elem['description'].split(/\n/).collect { |s| s.strip }.join(' ') # newlines to spaces
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



734
735
736
# File 'lib/reve/classes.rb', line 734

def description
  @description
end

#keyObject (readonly)

Returns the value of attribute key.



734
735
736
# File 'lib/reve/classes.rb', line 734

def key
  @key
end