dill 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/dill/version.rb +1 -1
  2. data/lib/dill/widget.rb +24 -0
  3. metadata +2 -2
@@ -1,3 +1,3 @@
1
1
  module Dill
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
@@ -222,6 +222,16 @@ module Dill
222
222
  checkpoint.wait_until(false) { cast_to(value) == value }
223
223
  end
224
224
 
225
+ # Calls +=~+ on this widget's text content.
226
+ def =~(regexp)
227
+ checkpoint.wait_until(false) { to_s =~ regexp }
228
+ end
229
+
230
+ # Calls +!~+ on this widget's text content.
231
+ def !~(regexp)
232
+ checkpoint.wait_until(false) { to_s !~ regexp }
233
+ end
234
+
225
235
  # Compares the current widget with +value+, waiting for the comparison
226
236
  # to return +false+.
227
237
  def !=(value)
@@ -298,6 +308,20 @@ module Dill
298
308
  self
299
309
  end
300
310
 
311
+ # Calls +match+ on this widget's text content.
312
+ #
313
+ # If a block is given, passes the resulting match data to the block.
314
+ #
315
+ # @param pattern the pattern to match
316
+ # @param position where to begin the search
317
+ #
318
+ # @yieldparam [MatchData] the match data from running +match+ on the text.
319
+ #
320
+ # @return [MatchData] the match data from running +match+ on the text.
321
+ def match(pattern, position = 0, &block)
322
+ checkpoint.wait_until(false) { to_s.match(pattern, position, &block) }
323
+ end
324
+
301
325
  def to_i
302
326
  to_s.to_i
303
327
  end
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: dill
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.2
5
+ version: 0.4.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - David Leal
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-05 00:00:00.000000000 Z
12
+ date: 2013-08-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  version_requirements: !ruby/object:Gem::Requirement