bets 0.0.2 → 0.0.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/bets/version.rb +1 -1
  2. data/lib/bets.rb +18 -17
  3. metadata +2 -2
data/lib/bets/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Bets
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/bets.rb CHANGED
@@ -100,7 +100,7 @@ module Bets
100
100
  @lang_map.each { |k,v| @names[name].gsub!(Regexp.new(k),v) }
101
101
  i += 1
102
102
  else
103
- @names[name] << ' ' + input[p]
103
+ @names[name] += ' ' + input[p]
104
104
  end
105
105
  when :end
106
106
  p+=1
@@ -113,25 +113,26 @@ module Bets
113
113
  end
114
114
  end
115
115
 
116
- def ff_goto(str)
117
- @ff.goto(str)
118
- end
119
-
120
- def ff_click(str)
121
- eval "@ff.wait_until{@ff.#{str}.exists?};@ff.#{str}.click"
122
- end
123
-
124
- def ff_set(str, value)
125
- eval "@ff.wait_until{@ff.#{str}.exists?};@ff.#{str}.set(#{value})"
126
- end
127
-
128
- def ff_get(str, name)
129
- eval "@ff.wait_until{@ff.#{str}.exists?};@ff.#{str}.#{name}"
130
- end
131
116
 
132
117
  def exec
133
118
  @binds.each do |b|
134
- text = "результат = FALSE; #{@names[b[0]]} if результат then #{@names[b[1]]} end;"
119
+
120
+ text =<<EOF
121
+ def ff_goto(str)
122
+ @ff.goto(str)
123
+ end
124
+ def ff_click(str)
125
+ instance_eval "@ff.wait_until{@ff.\#{str}.exists?};@ff.\#{str}.click"
126
+ end
127
+ def ff_set(str, value)
128
+ instance_eval "@ff.wait_until{@ff.\#{str}.exists?};@ff.\#{str}.set(\#{value})"
129
+ end
130
+ def ff_get(str, name)
131
+ instance_eval "@ff.wait_until{@ff.\#{str}.exists?};@ff.\#{str}.\#{name}"
132
+ end
133
+ результат = FALSE;
134
+ #{@names[b[0]]} if результат then #{@names[b[1]]} end;
135
+ EOF
135
136
  instance_eval text
136
137
  end
137
138
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-06 00:00:00.000000000 Z
12
+ date: 2012-09-07 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Gem for get data from bets
15
15
  email: