libledger 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/libledger/entry.rb +7 -0
- data/libledger.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21d2a5e653fea800acff701648c477dc42862403
|
4
|
+
data.tar.gz: 9648f9b22ff52900763a1b24fab12c6c2d178bd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bfcf8b26f193afab0340892d76834dfb59b04c58d6030c501ee5528a6cdcf69b5f2826998f0e52a4f90b12d6b2671cf733632ac0d95c2618f92942ef2c68311
|
7
|
+
data.tar.gz: d41846d4e84a973901532c2b20b7f9b40e04fc0bc61006504f77f011e86ffd80bce8553dc89d3437a0e7910378de4fbd8c9c0aea472c283a0fdc3613595ebf74
|
data/lib/libledger/entry.rb
CHANGED
@@ -12,6 +12,8 @@ module Ledger
|
|
12
12
|
##
|
13
13
|
# Declaration for entry object
|
14
14
|
class Entry
|
15
|
+
include Comparable
|
16
|
+
|
15
17
|
def initialize(params = {})
|
16
18
|
@data = params
|
17
19
|
end
|
@@ -46,6 +48,11 @@ module Ledger
|
|
46
48
|
subject_line + action_lines.join("\n") + "\n"
|
47
49
|
end
|
48
50
|
|
51
|
+
def <=>(other)
|
52
|
+
return nil unless other.is_a? Ledger::Entry
|
53
|
+
date <=> other.date
|
54
|
+
end
|
55
|
+
|
49
56
|
private
|
50
57
|
|
51
58
|
def subject_line
|
data/libledger.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libledger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les Aker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|