pyrb 0.1alpha

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 (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/pyrb.rb +23 -0
  3. metadata +46 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: adf21703a0f7a9ae6725fdbce78c812c3139f01034a1020d83be411d961f92fd
4
+ data.tar.gz: db3cdde215c29633e12df377549922e064b1be1166841411c2379b501b13891e
5
+ SHA512:
6
+ metadata.gz: c823086d32d95be58a1d9dabc3646566390854b3b4901eb870659a44a313ac86d697edfc5d83a07d28ca5f9a83ab6a6c059c1e92e3f521c32f1864f1225a9b8b
7
+ data.tar.gz: cc62f79cc955ca019c1066cf826dd14a48a5c8d6dc618634807d005f3e78010a02046daafcc0bd0c7c8e1a4d42923fda8c74f711ac0d275e5174b24731869e23
data/lib/pyrb.rb ADDED
@@ -0,0 +1,23 @@
1
+ # This is py.rb; it adds *basic* Python features to Ruby to make your workflow more pleasant!
2
+
3
+ def input(msg) # This adds the all-famous input() function! Hurray!
4
+ print(msg)
5
+ input = gets.chomp
6
+ return input
7
+ end
8
+
9
+ def str(arg) # str() from python
10
+ return arg.to_s
11
+ end
12
+
13
+ def int(arg) # int() from python
14
+ return arg.to_i
15
+ end
16
+
17
+ def float(arg) #float() from python
18
+ return arg.to_f
19
+ end
20
+
21
+ def import(arg)
22
+ require arg
23
+ end
metadata ADDED
@@ -0,0 +1,46 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pyrb
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1alpha
5
+ platform: ruby
6
+ authors:
7
+ - codic (Gurjus Bhasin)
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-12-16 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Py.rb adds basic syntax features from Python 3.0 to ruby which are nice
14
+ to have; input(), for example, reduces getting user input from two lines to one
15
+ lines; and I've ported it to Ruby, along with a couple other features!
16
+ email: gsbhasin84@gmail.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - lib/pyrb.rb
22
+ homepage:
23
+ licenses:
24
+ - MIT
25
+ metadata: {}
26
+ post_install_message:
27
+ rdoc_options: []
28
+ require_paths:
29
+ - lib
30
+ required_ruby_version: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ required_rubygems_version: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">"
38
+ - !ruby/object:Gem::Version
39
+ version: 1.3.1
40
+ requirements: []
41
+ rubygems_version: 3.1.0.pre1
42
+ signing_key:
43
+ specification_version: 4
44
+ summary: Py.rb adds basic features from the Python language, such as the input() function,
45
+ to Ruby. It's ultimate goal is to give Ruby a more Python-esque syntax in some places.
46
+ test_files: []