dynarex 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/dynarex.rb +7 -1
  2. metadata +1 -1
@@ -11,7 +11,7 @@ require 'ostruct'
11
11
  class Dynarex
12
12
  include REXML
13
13
 
14
- attr_accessor :format_mask
14
+ attr_accessor :format_mask, :delimiter
15
15
 
16
16
  #Create a new dynarex document from 1 of the following options:
17
17
  #* a local file path
@@ -22,8 +22,14 @@ class Dynarex
22
22
  # Dynarex.new '<contacts><summary><schema>contacts/contact(name,age,dob)</schema></summary><records/></contacts>'
23
23
 
24
24
  def initialize(location)
25
+ @delimiter = ' '
25
26
  open(location)
26
27
  end
28
+
29
+ def delimiter=(separator)
30
+ @format_mask = @format_mask.to_s.gsub(/\s/, separator)
31
+ @summary[:format_mask] = @format_mask
32
+ end
27
33
 
28
34
  def fields
29
35
  @fields
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynarex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors: []
7
7