jaguar 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c92175903729cf6db0a0fd0df11929d1fce67db2cebc311a7e7fce845a06a692
4
- data.tar.gz: a82db31e00693509df4bcac953723fe4c049268ac440fce0700f07550b910de7
3
+ metadata.gz: 9421621a8458c6e8859481ac560c55392f1e6bf29773149b0b1dc37d95a7773e
4
+ data.tar.gz: 4ae4715c52acde826cc2413caab25740e224f49256cb8db4b11af5b18d2ec651
5
5
  SHA512:
6
- metadata.gz: b548a64eab9bea07fe0760a688883ac665043724637c359d06f47f82a0c2c8d48718a11b4f6c097fa19015686928ff1e20bdcca1c885b915f4793c85a4a42838
7
- data.tar.gz: e776ff5915b10c37894a914e7dda0d4d830e2f5acb86dff4ba73f48375e03352a7632a21f4f2b04bad2f8f5d3d87ffb6de0b8f8d6951dd16d988681dc9bf8c50
6
+ metadata.gz: f54c609d4190205367c087e638ea9a50ad00bf1b2ba9af2e8b510a9ef57b015cfe70a39140b6e7ddc1f81679828fdc4096aac743dec5a204d0e5889887435209
7
+ data.tar.gz: 83e5e18682a7f1a452bb7513e9d5b85d35953cbdf731faa403eb7a513b21927bb6de497983aaafed1addf5861089251076f2e8478a90dc1bf8a0ae64f324bd4a
@@ -3,9 +3,9 @@ module Jaguar
3
3
  module Keyboard
4
4
  include Contracts::Core
5
5
 
6
- Contract Jaguar::C::Args[Jaguar::C::Or[String,Array,Symbol,Hash]] => self.class
7
- def self.type(*string_or_arrays_or_symbol_or_hashes)
8
- Type.type *string_or_arrays_or_symbol_or_hashes
6
+ Contract Jaguar::C::Args[Jaguar::C::Or[Integer,String,Symbol,Array,Hash]] => self.class
7
+ def self.type(*integer_or_string_or_symbol_or_array_or_hashes)
8
+ Type.type *integer_or_string_or_symbol_or_array_or_hashes
9
9
  self
10
10
  end
11
11
  end
@@ -4,9 +4,9 @@ module Jaguar
4
4
  module Type
5
5
  include Contracts::Core
6
6
 
7
- Contract Jaguar::C::Args[Jaguar::C::Or[String,Array,Symbol,Hash]] => self.class
8
- def self.type(*string_or_arrays_or_symbol_or_hashes)
9
- opts, type_sequence = parse_type_args_to_opts_and_type_sequence string_or_arrays_or_symbol_or_hashes
7
+ Contract Jaguar::C::Args[Jaguar::C::Or[Integer,String,Symbol,Array,Hash]] => self.class
8
+ def self.type(*integer_or_string_or_symbol_or_arrays_or_hashes)
9
+ opts, type_sequence = parse_type_args_to_opts_and_type_sequence integer_or_string_or_symbol_or_arrays_or_hashes
10
10
 
11
11
  sequence = unpack_type_sequence type_sequence
12
12
  delay = opts[:delay]
@@ -17,7 +17,7 @@ module Jaguar
17
17
  already_delayed = false
18
18
 
19
19
  case s
20
- when String
20
+ when String,Integer
21
21
  Jaguar.debug "direct_write_instead_of_key_presses?(delay)", direct_write_instead_of_key_presses?(delay)
22
22
 
23
23
  if direct_write_instead_of_key_presses?(delay)
@@ -67,16 +67,16 @@ module Jaguar
67
67
 
68
68
  private
69
69
 
70
- Contract Jaguar::C::Args[Jaguar::C::Or[String,Array,Symbol,Hash]] => Array[Hash,Array]
70
+ Contract Jaguar::C::Args[Jaguar::C::Or[Integer,String,Symbol,Array,Hash]] => Array[Hash,Array]
71
71
  def self.parse_type_args_to_opts_and_type_sequence(args)
72
72
  opts = {}
73
73
  type_sequence = []
74
- args.each do |string_or_array_or_symbol_or_hash|
75
- case string_or_array_or_symbol_or_hash.class.name
76
- when "String", "Array", "Symbol"
77
- type_sequence << string_or_array_or_symbol_or_hash
74
+ args.each do |integer_or_string_or_symbol_or_array_or_hash|
75
+ case integer_or_string_or_symbol_or_array_or_hash.class.name
76
+ when "Integer","String", "Array", "Symbol"
77
+ type_sequence << integer_or_string_or_symbol_or_array_or_hash
78
78
  when "Hash"
79
- opts.merge!(string_or_array_or_symbol_or_hash)
79
+ opts.merge!(integer_or_string_or_symbol_or_array_or_hash)
80
80
  end
81
81
  end
82
82
  [opts, type_sequence]
@@ -1,3 +1,3 @@
1
1
  module Jaguar
2
- VERSION = "0.1.2"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jaguar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Superbot HQ
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-15 00:00:00.000000000 Z
11
+ date: 2018-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry