debitcredit 0.0.8 → 0.0.9

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: 1690d9b12f32733ed384041e07b79a516aa46314
4
- data.tar.gz: eea86b5763ea4e1cef8ea9f336ff8433afc1e38b
3
+ metadata.gz: a5ef2706b310724b17c5c806f1f833b3150c584d
4
+ data.tar.gz: 3151004ca530b8cdc74e52b189ccd0a17812c945
5
5
  SHA512:
6
- metadata.gz: f462092f1869f144ff2de14cd66b606998c94307fa84f2532ec16e57fe01943b7503cc00033ca7f52e175682b0bb02c8f45d57b0b1b4c4c4a4d7e794ffda86c6
7
- data.tar.gz: 31b5404ae2b5a0b05be9a646435a74ea428cdb6a499c43debe8b5f37dc7ea77ef21be33ffc58950e95120ea3f9352a25d9fa4d4b5e7d7c9b1809e101b4bf968b
6
+ metadata.gz: 68ad956fde9ff67286115563e8dd576be91de77fe7361a32aac2f4549755feac7f30760f88349fae57c009869f47f178ac67892b7afbd8fde52bdfb03387a72e
7
+ data.tar.gz: be72dc033737575ac2118602123c9f0e5d483f091cd1425fe1b14767804710b4cc1eac4f907a6f4853dee3434f4c0a8fe1188f6dbd284663e4c94ad1683c11f5
@@ -1,10 +1,25 @@
1
- class Debitcredit::Transaction::DSL
1
+ class Debitcredit::Transaction::Dsl
2
2
  attr_accessor :transaction
3
3
  attr_accessor :accounts
4
+
4
5
  def initialize(transaction)
5
6
  @transaction = transaction
6
7
  end
7
8
 
9
+ def kind(kind)
10
+ @transaction.kind = kind
11
+ end
12
+
13
+ def description(desc)
14
+ @transaction.description = desc
15
+ end
16
+ alias desc description
17
+
18
+ def reference(ref)
19
+ @transaction.reference = ref
20
+ end
21
+ alias ref reference
22
+
8
23
  def debit(account, amount, comment = nil)
9
24
  build_item true, account, amount, comment
10
25
  end
@@ -12,7 +12,7 @@ module Debitcredit
12
12
 
13
13
  def self.prepare(opts = {}, &block)
14
14
  new(opts).tap do |t|
15
- Docile.dsl_eval(DSL.new(t), &block)
15
+ Docile.dsl_eval(Dsl.new(t), &block)
16
16
  end
17
17
  end
18
18
 
@@ -1,3 +1,3 @@
1
1
  module Debitcredit
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: debitcredit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitaly Kushner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-29 00:00:00.000000000 Z
11
+ date: 2014-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails