swifty 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/swifty.rb +27 -0
- metadata +44 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7decbf923c67ea0f5f371facb0404c76aa2aaa36
|
4
|
+
data.tar.gz: 0774bc7e4cffec29074eca735c793cb193ab1bb3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 74231388edd75f900675a37cbb64176db27158e8b51be6f2c3d2e84ad5cdf8628141f8d7f787a3235c45458ab781d1762fd40e32e15a9288bfc0814ba2c215df
|
7
|
+
data.tar.gz: 884301c0dd5d5a975245f0728c2702a616d45da3b55f68a64e30eb13c55541bdb6b16ed32fc5fd0aaebc9463ca01b776c847f7dc8b68d6de90f2cf50f38d90d6
|
data/lib/swifty.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
$root = Pathname.pwd
|
3
|
+
$:.unshift $root.join('lib').to_s
|
4
|
+
|
5
|
+
require 'active_support/all'
|
6
|
+
require 'cmxl'
|
7
|
+
require 'cmxl/config'
|
8
|
+
require 'cmxl/header'
|
9
|
+
require 'choice'
|
10
|
+
require 'pp'
|
11
|
+
require 'yaml'
|
12
|
+
require 'exceptions'
|
13
|
+
|
14
|
+
class Swifty
|
15
|
+
attr_reader :content, :options
|
16
|
+
|
17
|
+
def initialize(file, **options)
|
18
|
+
@options = options
|
19
|
+
@content = file.is_a?(File) ? file.read : File.read(file)
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def statements
|
25
|
+
@statements ||= Cmxl.parse content, encoding: options[:encoding]
|
26
|
+
end
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: swifty
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Emil Kampp
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-08-03 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A customized swift parser, able to handle several different banks.
|
14
|
+
email: emk@inpay.com
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/swifty.rb
|
20
|
+
homepage: http://rubygems.org/gems/swifty
|
21
|
+
licenses:
|
22
|
+
- MIT
|
23
|
+
metadata: {}
|
24
|
+
post_install_message:
|
25
|
+
rdoc_options: []
|
26
|
+
require_paths:
|
27
|
+
- lib
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - ">="
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
requirements: []
|
39
|
+
rubyforge_project:
|
40
|
+
rubygems_version: 2.4.8
|
41
|
+
signing_key:
|
42
|
+
specification_version: 4
|
43
|
+
summary: A small swift message parser
|
44
|
+
test_files: []
|