polyrex 0.8.4 → 0.8.5

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/polyrex.rb +9 -4
  2. metadata +36 -29
data/lib/polyrex.rb CHANGED
@@ -64,11 +64,12 @@ class Polyrex
64
64
  def format_masks
65
65
  @format_masks
66
66
  end
67
-
68
- def parse(lines)
69
- format_line!(@parent_node, LineTree.new(lines).to_a)
67
+
68
+ def parse(buffer='')
69
+ buffer = yield if block_given?
70
+ string_parse buffer
70
71
  self
71
- end
72
+ end
72
73
 
73
74
  def element(s)
74
75
  @doc.element(s)
@@ -130,6 +131,10 @@ class Polyrex
130
131
  ("<%s><summary>%s</summary><records/></%s>" % [root_name, (summary || '') , root_name])
131
132
  end
132
133
 
134
+ def string_parse(lines)
135
+ format_line!(@parent_node, LineTree.new(lines).to_a)
136
+ end
137
+
133
138
  def load_handlers(schema)
134
139
  @create = PolyrexCreateObject.new(schema, @id)
135
140
  objects = PolyrexObjects.new(schema)
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polyrex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ prerelease:
5
+ version: 0.8.5
5
6
  platform: ruby
6
7
  authors: []
7
8
 
@@ -9,69 +10,75 @@ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
12
 
12
- date: 2011-01-30 00:00:00 +00:00
13
+ date: 2011-03-13 00:00:00 +00:00
13
14
  default_executable:
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: polyrex-schema
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
20
21
  requirements:
21
22
  - - ">="
22
23
  - !ruby/object:Gem::Version
23
24
  version: "0"
24
- version:
25
+ type: :runtime
26
+ version_requirements: *id001
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: line-tree
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
29
+ prerelease: false
30
+ requirement: &id002 !ruby/object:Gem::Requirement
31
+ none: false
30
32
  requirements:
31
33
  - - ">="
32
34
  - !ruby/object:Gem::Version
33
35
  version: "0"
34
- version:
36
+ type: :runtime
37
+ version_requirements: *id002
35
38
  - !ruby/object:Gem::Dependency
36
39
  name: polyrex-objects
37
- type: :runtime
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
40
+ prerelease: false
41
+ requirement: &id003 !ruby/object:Gem::Requirement
42
+ none: false
40
43
  requirements:
41
44
  - - ">="
42
45
  - !ruby/object:Gem::Version
43
46
  version: "0"
44
- version:
47
+ type: :runtime
48
+ version_requirements: *id003
45
49
  - !ruby/object:Gem::Dependency
46
50
  name: polyrex-createobject
47
- type: :runtime
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
51
+ prerelease: false
52
+ requirement: &id004 !ruby/object:Gem::Requirement
53
+ none: false
50
54
  requirements:
51
55
  - - ">="
52
56
  - !ruby/object:Gem::Version
53
57
  version: "0"
54
- version:
58
+ type: :runtime
59
+ version_requirements: *id004
55
60
  - !ruby/object:Gem::Dependency
56
61
  name: polyrex-object-methods
57
- type: :runtime
58
- version_requirement:
59
- version_requirements: !ruby/object:Gem::Requirement
62
+ prerelease: false
63
+ requirement: &id005 !ruby/object:Gem::Requirement
64
+ none: false
60
65
  requirements:
61
66
  - - ">="
62
67
  - !ruby/object:Gem::Version
63
68
  version: "0"
64
- version:
69
+ type: :runtime
70
+ version_requirements: *id005
65
71
  - !ruby/object:Gem::Dependency
66
72
  name: polyrex-xslt
67
- type: :runtime
68
- version_requirement:
69
- version_requirements: !ruby/object:Gem::Requirement
73
+ prerelease: false
74
+ requirement: &id006 !ruby/object:Gem::Requirement
75
+ none: false
70
76
  requirements:
71
77
  - - ">="
72
78
  - !ruby/object:Gem::Version
73
79
  version: "0"
74
- version:
80
+ type: :runtime
81
+ version_requirements: *id006
75
82
  description:
76
83
  email:
77
84
  executables: []
@@ -92,21 +99,21 @@ rdoc_options: []
92
99
  require_paths:
93
100
  - lib
94
101
  required_ruby_version: !ruby/object:Gem::Requirement
102
+ none: false
95
103
  requirements:
96
104
  - - ">="
97
105
  - !ruby/object:Gem::Version
98
106
  version: "0"
99
- version:
100
107
  required_rubygems_version: !ruby/object:Gem::Requirement
108
+ none: false
101
109
  requirements:
102
110
  - - ">="
103
111
  - !ruby/object:Gem::Version
104
112
  version: "0"
105
- version:
106
113
  requirements: []
107
114
 
108
115
  rubyforge_project:
109
- rubygems_version: 1.3.5
116
+ rubygems_version: 1.5.2
110
117
  signing_key:
111
118
  specification_version: 3
112
119
  summary: polyrex