rubyino 0.1.0 → 0.1.1

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 (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.org +21 -0
  3. data/lib/rubyino.rb +9 -2
  4. metadata +5 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ff9f7fadfe910752ba9ede07c6ea6debb9f9c2b115f37991b8f127bb18e1bf1
4
- data.tar.gz: 305de24afcc888085243233d151af7132f79fc3ca3b7cc59c85bee0b59846100
3
+ metadata.gz: '05815328e1d01ca3c5678dad0d82d37783638b5f5167d29a348bbd8a9296110c'
4
+ data.tar.gz: 108b1df8cf5291fefd4d7db9e0d09e7e33989fa95e2af3e5cbde180ef4c69409
5
5
  SHA512:
6
- metadata.gz: 8ce95f949eecdbe0cce4a79f6ef4042c4bc815455e975d32b50cb41686b5e3d25746daa5ef48af82401f05c36046b35a6d164dd5954dbde488e0886281e466e7
7
- data.tar.gz: 4ccbac5d47c2835ccfeaa0d064eb44d42582c51fb3f7d564c1b2b953c3eb341902443b3db9ffa1ac6a175e63ecada39c8aef7c9cc8fbb70a33b43675c99d88d0
6
+ metadata.gz: 30d33d58530cd190e6cfe19e4a71f4a08110dd7048815fd7af57bbe9a4ccf06e26381ad1b7902b3cf214fe5113bb613bdd16132ccfdcc8689e5d08b2bbcaf2ff
7
+ data.tar.gz: 0e3ab7f63e8df4659ae04abee3b9d452fed848803cc962d943e62d567775c488394f65e25d17befb9b307160a68ec4b6e24a21372928ca3a483bd8057e49bd29
data/README.org ADDED
@@ -0,0 +1,21 @@
1
+ # Rubyino
2
+ Translate ruby to arduino
3
+ ## install with gem
4
+ ``` gem install rubyino ```
5
+
6
+ ### or
7
+
8
+ ```
9
+ git clone https://github.com/nimacpp/Rubyino.git
10
+ cd Rubyino
11
+ bundle install
12
+ ```
13
+ # use Rubyino
14
+ ## start use
15
+ ``` rb = Rubyino.new("namefile") ```
16
+ ## for print
17
+ ``` rb.puts "hello world" #=> Keyboard.print("hello world"); ```
18
+ ## for delay
19
+ ``` rb.delay 500 #=> delay(500); ```
20
+ ## for translate
21
+ ``` rb.ter # for give output ```
data/lib/rubyino.rb CHANGED
@@ -15,7 +15,7 @@ Keyboard.begin();"];
15
15
  def initialize(path)
16
16
  @@path = path+".ino"
17
17
  end
18
- def puts(text)
18
+ def print(text)
19
19
  @@lines.push "Keyboard.print(\"#{text}\");"
20
20
  end
21
21
  def enter
@@ -24,6 +24,9 @@ Keyboard.begin();"];
24
24
  def win_pls(key)
25
25
  @@lines.push "Keyboard.press(KEY_LEFT_GUI);\nKeyboard.press('#{key[0]}');\nKeyboard.releaseAll();"
26
26
  end
27
+ def use(lib)
28
+ @@lines.insert(0, "include <#{lib}>")
29
+ end
27
30
  def select(array)
28
31
  for i in array
29
32
  @@lines.push "Keyboard.press('#{i}');"
@@ -31,7 +34,11 @@ Keyboard.begin();"];
31
34
  @@lines.push "Keyboard.releaseAll();"
32
35
  end
33
36
  def show
34
- return " #{@@path}||#{@@lines}"
37
+ puts "Rubyino info"
38
+ puts "--------------------------"
39
+ puts " file name : #{@@path}"
40
+ puts "=========================="
41
+ puts @@lines
35
42
  end
36
43
  def delay(num)
37
44
  @@lines.push "delay(#{num});"
metadata CHANGED
@@ -1,21 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyino
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - nima cpp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-20 00:00:00.000000000 Z
11
+ date: 2022-07-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: teranslate ruby to arduino
14
14
  email: swithwebb31@email.com
15
15
  executables: []
16
16
  extensions: []
17
- extra_rdoc_files: []
17
+ extra_rdoc_files:
18
+ - README.org
18
19
  files:
20
+ - README.org
19
21
  - lib/rubyino.rb
20
22
  homepage: https://rubygems.org/gems/hola
21
23
  licenses: