rexle 0.6.4 → 0.6.5

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.
Files changed (2) hide show
  1. data/lib/rexle.rb +9 -2
  2. metadata +2 -2
data/lib/rexle.rb CHANGED
@@ -187,7 +187,12 @@ class Rexle
187
187
 
188
188
  def root() self end
189
189
  def text(s='')
190
- s.empty? ? @value : self.xpath(s).first.value
190
+ if s.empty? then
191
+ @value
192
+ else
193
+ e = self.element(s)
194
+ e.value if e
195
+ end
191
196
  end
192
197
 
193
198
  alias text= value=
@@ -203,7 +208,9 @@ class Rexle
203
208
  end
204
209
  out
205
210
  end
206
-
211
+ @doc = Rexle.new xml
212
+ @schema = @doc.root.text('summary/schema')
213
+ @root_name = @doc.root.name
207
214
  def format_attributes(condition)
208
215
  raw_items = condition[1..-1].scan(/\'[^\']*\'|and|or|\d+|[!=]+|[@\w\.]+/)
209
216
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rexle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors: []
7
7
 
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-12-03 00:00:00 +00:00
12
+ date: 2010-12-04 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency