rubyserif 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -7
- data/lib/rubyserif.rb +5 -6
- metadata +1 -1
data/README.md
CHANGED
@@ -5,14 +5,10 @@ _swarley's poor excuse for JavaScript like features_
|
|
5
5
|
|
6
6
|
Create JSON objects and functions with the JavaScript module.
|
7
7
|
|
8
|
-
> Module JavaScript
|
8
|
+
> -- Module JavaScript
|
9
9
|
>
|
10
|
-
>
|
10
|
+
> - Object
|
11
11
|
>
|
12
|
-
> -
|
13
|
-
>
|
14
|
-
> |
|
15
|
-
>
|
16
|
-
> - class Function
|
12
|
+
> - Function
|
17
13
|
|
18
14
|
I may add more. Who knows?
|
data/lib/rubyserif.rb
CHANGED
@@ -1,7 +1,4 @@
|
|
1
1
|
module JavaScript
|
2
|
-
def JavaScript.Version
|
3
|
-
return '0.1'
|
4
|
-
end
|
5
2
|
class Object
|
6
3
|
def initialize(hash={}, constants=[]) #Put keys into constants that you want to be read only
|
7
4
|
@hash,@constants=hash,constants
|
@@ -21,7 +18,7 @@ module JavaScript
|
|
21
18
|
when :elements
|
22
19
|
return @hash.keys
|
23
20
|
when :constants
|
24
|
-
return @constants
|
21
|
+
return @constants
|
25
22
|
else
|
26
23
|
return nil
|
27
24
|
end
|
@@ -46,5 +43,7 @@ module JavaScript
|
|
46
43
|
@temp = nil
|
47
44
|
end
|
48
45
|
end
|
49
|
-
|
50
|
-
|
46
|
+
end
|
47
|
+
|
48
|
+
__END__
|
49
|
+
|