workspace-parse 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/workspace-parse.rb +7 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0ba08d02decc707058acb29c52c837fbab22117d
4
- data.tar.gz: d36881d8c0474644d85aa1aedcceb524fcd590a5
3
+ metadata.gz: 76adfb84a140893680d8dfa3d6ceeb65285c48f0
4
+ data.tar.gz: ecc5156193918bd9d2c6a9e0c56af6aaa0be491b
5
5
  SHA512:
6
- metadata.gz: ea8c4c869d8a69ae8720cbdbc1e3b75d645bd9deba0b0d87955b0d75a039fb9dd2a2c0aaab88588d53300808a3ef9d68ba549a3bb2076cc53170c02c670072ea
7
- data.tar.gz: a4da9104d86d3a461cb358969e921ef93ce11a4d9fb5cf310f4f510a7a5743504e9737479651c8a43967b7baccec97f314c0294bc8d454d67b8f0e9f950e1fc5
6
+ metadata.gz: 4277982f821c2291115ec9c9a31c6853a9896f66aa59c6db3c2a4398d45415ae646856b8b0e90140824ca00643aa20b3f385d73f5626e30c7bd01167ab7a60b6
7
+ data.tar.gz: d43ed1c669a6db9d80dc15761a04ee07279755381c64fe72b6e44f96f1bcb195eaee13a78400c7ee026ee39c240101af05993c5962fd9b15ed32cfc6dfea5e68
@@ -1,4 +1,7 @@
1
1
  require "haml"
2
+ require 'erb'
3
+ require 'ostruct'
4
+
2
5
  module Workspace
3
6
  class File
4
7
  def read_json
@@ -13,5 +16,9 @@ module Workspace
13
16
  engine = Haml::Engine.new(read)
14
17
  engine.render(Object.new, options)
15
18
  end
19
+
20
+ def read_erb(options = {})
21
+ ERB.new(::File.read(to_s)).result(OpenStruct.new(options).instance_eval { binding })
22
+ end
16
23
  end
17
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workspace-parse
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Strebitzer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-03 00:00:00.000000000 Z
11
+ date: 2017-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: workspace