ruval 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ruval.rb +10 -3
- data/lib/ruval/version.rb +1 -1
- data/prog.rb +24 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7368f32aa2ed6990a60104533df72f1c932fead5f25975ade130e0da10833e0b
|
4
|
+
data.tar.gz: 1b76d3eb818f9ad450a69a9ba85174514b34f21b4489cb1e3987f43b7f8dd878
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bcc364d3c103ae9b97de16decbb038d51910f1280b0ddd1c132413df9011ce6f4800304431079d5a14429ba694aa793ce4f13e1d003f6539010bb3543f24e4d
|
7
|
+
data.tar.gz: cba757d72b51fb6c875a0f7bcb2e9b359a6cf3c0a5ea04c01168478b73e48daba7e0705dcfe05fdfaeac83e6c52b2e0c5273ba8f6766776874daa9202bb89192
|
data/Gemfile.lock
CHANGED
data/lib/ruval.rb
CHANGED
@@ -88,9 +88,16 @@ File.read(file).each_line do |l|
|
|
88
88
|
l = if line_stack.empty?
|
89
89
|
line_spacing == 0 ? l.remove_comments(longest) : l
|
90
90
|
else
|
91
|
-
line_stack.join
|
91
|
+
line_stack.slice!(0,line_stack.length).join
|
92
92
|
end
|
93
|
-
|
94
|
-
|
93
|
+
value = eval(l, TOPLEVEL_BINDING)
|
94
|
+
value = if value.class == String
|
95
|
+
"\"#{value}\""
|
96
|
+
elsif value.class == Symbol
|
97
|
+
":#{value}"
|
98
|
+
else
|
99
|
+
value
|
100
|
+
end
|
101
|
+
puts l + "=> #{value}" + "\n"*line_spacing
|
95
102
|
end
|
96
103
|
|
data/lib/ruval/version.rb
CHANGED
data/prog.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
'hola'
|
2
|
+
|
3
|
+
%w(a b c)
|
4
|
+
%i(d e f)
|
5
|
+
|
6
|
+
def good; ':)'; end
|
7
|
+
|
8
|
+
def bad
|
9
|
+
':('
|
10
|
+
end
|
11
|
+
|
12
|
+
class Person
|
13
|
+
attr_accessor :name, :mood
|
14
|
+
|
15
|
+
def initialize(name='bob')
|
16
|
+
@name='bob'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
person1 = Person.new
|
21
|
+
person1.name
|
22
|
+
person1.mood = good
|
23
|
+
person1.mood
|
24
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruval
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sergio
|
@@ -32,6 +32,7 @@ files:
|
|
32
32
|
- exe/rv
|
33
33
|
- lib/ruval.rb
|
34
34
|
- lib/ruval/version.rb
|
35
|
+
- prog.rb
|
35
36
|
- ruval.gemspec
|
36
37
|
homepage:
|
37
38
|
licenses:
|