general 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gio.rb +13 -4
- 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: ca9ebfe83430fa6d71009c18efe523203f06d1cf
|
4
|
+
data.tar.gz: 184093b86de685cc61ee89592c210c68abfc26d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cffd672f5d65cf8c71c9498c1095085f7377b10e9d51ea77321caa50c539d05644e238a106fad5781a61b468b9f1c05eb178f86855b7c208d5803b0bab6d08a9
|
7
|
+
data.tar.gz: 20f2a769d5b582fe47eab9a2bda3fc2006f235c897c27a9ac0dca166451bb280eada55b23700d33171d05fcab1426087b256ceafbef5e16080979bc44cb70a1b
|
data/lib/gio.rb
CHANGED
@@ -29,16 +29,25 @@ module General
|
|
29
29
|
# The general file extension
|
30
30
|
EXTENSION = ".general"
|
31
31
|
|
32
|
+
# Public read source
|
33
|
+
attr :source
|
34
|
+
|
32
35
|
# Loads a GIO from a file with the given path
|
33
36
|
#
|
34
37
|
# Parameter: path - the path of the file to load
|
35
38
|
#
|
36
39
|
# Return: GIO loaded from the file
|
37
40
|
def self.load path
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
41
|
+
self.new IO.read(path), path
|
42
|
+
end
|
43
|
+
|
44
|
+
# Creates a GIO with the given template string and source filename
|
45
|
+
#
|
46
|
+
# Parameter: string - the string being converted to a template
|
47
|
+
# Parameter: source - the name of the source file of the template
|
48
|
+
def initialize string, source=nil
|
49
|
+
super string
|
50
|
+
@source = source
|
42
51
|
end
|
43
52
|
|
44
53
|
# Writes the template with the given
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: general
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anshul Kharbanda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|