change attr_accessor to attr_reader everywhere
This commit is contained in:
parent
4e882e60dc
commit
326dbd3fcd
@ -2,20 +2,20 @@ module Gnucash
|
|||||||
# Represent a GnuCash account object
|
# Represent a GnuCash account object
|
||||||
class Account
|
class Account
|
||||||
# _String_: The name of the account (unqualified)
|
# _String_: The name of the account (unqualified)
|
||||||
attr_accessor :name
|
attr_reader :name
|
||||||
|
|
||||||
# _String_: The account type (such as "EXPENSE")
|
# _String_: The account type (such as "EXPENSE")
|
||||||
attr_accessor :type
|
attr_reader :type
|
||||||
|
|
||||||
# _String_: The GUID of the account
|
# _String_: The GUID of the account
|
||||||
attr_accessor :id
|
attr_reader :id
|
||||||
|
|
||||||
# _Array_: List of _AccountTransaction_ transactions associated with this
|
# _Array_: List of _AccountTransaction_ transactions associated with this
|
||||||
# account.
|
# account.
|
||||||
attr_accessor :transactions
|
attr_reader :transactions
|
||||||
|
|
||||||
# Boolean: whether the account is a placeholder or not
|
# Boolean: whether the account is a placeholder or not
|
||||||
attr_accessor :placeholder
|
attr_reader :placeholder
|
||||||
|
|
||||||
# Create an Account object.
|
# Create an Account object.
|
||||||
# === Arguments
|
# === Arguments
|
||||||
|
@ -2,7 +2,7 @@ module Gnucash
|
|||||||
# Class to link a transaction object to an Account.
|
# Class to link a transaction object to an Account.
|
||||||
class AccountTransaction
|
class AccountTransaction
|
||||||
# _Gnucash::Value_: The transaction value for the linked account
|
# _Gnucash::Value_: The transaction value for the linked account
|
||||||
attr_accessor :value
|
attr_reader :value
|
||||||
|
|
||||||
# Construct an AccountTransaction object.
|
# Construct an AccountTransaction object.
|
||||||
# This method is used internally when building a Transaction object.
|
# This method is used internally when building a Transaction object.
|
||||||
|
@ -5,16 +5,16 @@ module Gnucash
|
|||||||
# Represent a GnuCash Book
|
# Represent a GnuCash Book
|
||||||
class Book
|
class Book
|
||||||
# _Array_ of _Gnucash::Account_ objects in the book
|
# _Array_ of _Gnucash::Account_ objects in the book
|
||||||
attr_accessor :accounts
|
attr_reader :accounts
|
||||||
|
|
||||||
# _Array_ of _Gnucash::Transaction_ objects in the book
|
# _Array_ of _Gnucash::Transaction_ objects in the book
|
||||||
attr_accessor :transactions
|
attr_reader :transactions
|
||||||
|
|
||||||
# _String_ in "YYYY-MM-DD" format of the first transaction in the book
|
# _String_ in "YYYY-MM-DD" format of the first transaction in the book
|
||||||
attr_accessor :start_date
|
attr_reader :start_date
|
||||||
|
|
||||||
# _String_ in "YYYY-MM-DD" format of the last transaction in the book
|
# _String_ in "YYYY-MM-DD" format of the last transaction in the book
|
||||||
attr_accessor :end_date
|
attr_reader :end_date
|
||||||
|
|
||||||
# Construct a Book object.
|
# Construct a Book object.
|
||||||
# Normally called internally by Gnucash.open()
|
# Normally called internally by Gnucash.open()
|
||||||
|
@ -5,16 +5,16 @@ module Gnucash
|
|||||||
# with an individual account.
|
# with an individual account.
|
||||||
class Transaction
|
class Transaction
|
||||||
# _String_: The date of the transaction, in ISO format ("YYYY-MM-DD")
|
# _String_: The date of the transaction, in ISO format ("YYYY-MM-DD")
|
||||||
attr_accessor :date
|
attr_reader :date
|
||||||
|
|
||||||
# _String_: The GUID of the transaction
|
# _String_: The GUID of the transaction
|
||||||
attr_accessor :id
|
attr_reader :id
|
||||||
|
|
||||||
# _String_: The description of the transaction
|
# _String_: The description of the transaction
|
||||||
attr_accessor :description
|
attr_reader :description
|
||||||
|
|
||||||
# _Array_ of _Hash_ with keys +account+ and +value+
|
# _Array_ of _Hash_ with keys +account+ and +value+
|
||||||
attr_accessor :splits
|
attr_reader :splits
|
||||||
|
|
||||||
# Create a new Transaction object
|
# Create a new Transaction object
|
||||||
# === Arguments
|
# === Arguments
|
||||||
|
@ -5,7 +5,7 @@ module Gnucash
|
|||||||
include Comparable
|
include Comparable
|
||||||
|
|
||||||
# _Fixnum_:: The raw, undivided integer value
|
# _Fixnum_:: The raw, undivided integer value
|
||||||
attr_accessor :val
|
attr_reader :val
|
||||||
|
|
||||||
# Create a new Value object with value 0
|
# Create a new Value object with value 0
|
||||||
def self.zero
|
def self.zero
|
||||||
|
Loading…
x
Reference in New Issue
Block a user