feidee_utils 0.0.4.4 → 0.0.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9cc0908a9717145ac9f863abad4f5d4ff910a898
4
- data.tar.gz: 64d25e89e933a547ba71e6e412b64178dc7a9310
3
+ metadata.gz: 25f4aacc8498733f8711c5d64df58d9585127787
4
+ data.tar.gz: dad19bf406c330c56c34c0b5f1a22d2d26ab401f
5
5
  SHA512:
6
- metadata.gz: 0fc21e8b91f1f7f44404163478533ffcdffc4c42455bdd0f81881758c1a5faa12e49193d500869d22cf52a416fc2ce4a5a38ad71d5f6552194f265fdbb4649dc
7
- data.tar.gz: 3e78c29a78d14c2ca7e0ce2c5cab4c914ae02b2a39a13feb337726e859ba6de0a56cb42bab28c18c602f42c7b0bc828ce6d11c77b7a142e1135622caf23054fe
6
+ metadata.gz: 04e3f08c178d793c83a6c40baf435a065493f819dd2a74c1a85a359c4e41e0fc1be118dad36054a37df1e45bc15138882a0beecafe4523082fd9a988daf4509b
7
+ data.tar.gz: 79d9ac9988647d19e02ed3416e4f9fefc2f8d79ffce73e3dbc07f388e886f74062d7c23ceeefe1c31b31aa8a39801b47538053fd94627f313774e4d9c7b35e84
@@ -33,7 +33,7 @@ module FeideeUtils
33
33
 
34
34
  define_method accessor_name do
35
35
  poid = method(poid_callback_name).call
36
- self.class.environment.const_get(target_class_name).find(poid)
36
+ self.class.environment.const_get(target_class_name).find_by_id(poid)
37
37
  end
38
38
  end
39
39
  end
@@ -53,7 +53,7 @@ module FeideeUtils
53
53
  end
54
54
 
55
55
  def find(id)
56
- find_by_id(id) or raise "No #{self.name} of poid #{id} found"
56
+ find_by_id(id) or raise "No #{self.entity_name} of poid #{id} found"
57
57
  end
58
58
  end
59
59
  end
@@ -201,14 +201,15 @@ module FeideeUtils
201
201
  end
202
202
 
203
203
  def to_s
204
- if is_transfer?
205
- "Transfer #{amount.to_f} from #{buyer_account} to #{seller_account}"
204
+ str = if is_transfer?
205
+ (type == :transfer_buyer ? "Buyer" : "Seller") +
206
+ " transfer #{amount.to_f} from #{buyer_account} to #{seller_account}"
206
207
  elsif is_initial_balance?
207
208
  "Balance of #{revised_account} set to #{revised_amount.to_f}"
208
209
  else
209
- "Transaction of #{revised_amount.to_f} on #{revised_account} in " +
210
- "#{category}"
210
+ "Entry of #{revised_amount.to_f} on #{revised_account} in #{category}"
211
211
  end
212
+ str + " at #{trade_at} (Transaction #{poid})";
212
213
  end
213
214
 
214
215
  class ModifiedTransaction < ModifiedRecord
@@ -1,3 +1,3 @@
1
1
  module FeideeUtils
2
- VERSION = '0.0.4.4'
2
+ VERSION = '0.0.4.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feidee_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4.4
4
+ version: 0.0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liqing Muyi