js_obj 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -15
  3. data/demo.rb +10 -15
  4. data/lib/js_obj/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6306d40748c7455044d8a32b28127f2a9d938844
4
- data.tar.gz: 0fa188ced5697a9413f5d0881e14ed0fa11a0ce3
3
+ metadata.gz: fc7fad58fc276beb3b52ad93338988801ffaf90b
4
+ data.tar.gz: 7617cc15f87aced2cdab0c501dd3f707cece9b48
5
5
  SHA512:
6
- metadata.gz: 293721131af70d854322c068518e1b71a824f8048470d22a784d49e7a05dcada2eec776742cd404c8f8b4df1bf449907536d5156afd5050f9073fa34dbcae53f
7
- data.tar.gz: 3192d827497b668390ef52dd2671859a6d325510b0acce98f852345b46b1e2128cadb6add30d16fda82c38e65b7d1b82807870f680667fbf2a103b6e0f391fe1
6
+ metadata.gz: 2a9e8894697f228d4f1b5235dc6072e659e09fa14ae7ce2b659cae427a79de36f27ae8e6b411bd5a54629017ceffd6f62689d953ac979bb35647b5bc1030d657
7
+ data.tar.gz: 0f3989066af46a68d463c43e3dda825fd6e89e533ff0d211fda4a7dd5d6547654688a37f18531c6120f8689c25e40aeff5336a1358e6daf9d293991b8ac2f4b5
data/README.md CHANGED
@@ -25,32 +25,27 @@ require 'js_obj'
25
25
 
26
26
  user = {
27
27
  id: 1001,
28
+ name: 'user1',
28
29
  position: {
29
30
  x: 10.5,
30
31
  y: -1.2
31
32
  }
32
33
  }
33
34
 
34
- # Get Property
35
+ # Get
36
+ puts user.id #=> 1001
37
+ puts user.position.x #=> 10.5
35
38
 
36
- puts user.id
37
- #=> 1001
38
- puts user.position.x
39
- #=> 10.5
40
-
41
- # Add property
42
-
43
- user.name = "user1"
44
- puts user.name
45
- #=> user1
39
+ # Set
40
+ user.name = "Jason"
41
+ puts user.name #=> "Jason"
46
42
 
43
+ # Add
47
44
  user.position.z = 9.8
48
- puts user.position.z
49
- #=> 9.8
45
+ puts user.position.z #=> 9.8
50
46
 
51
47
  # Usual way
52
- puts user[:id]
53
- #=> 1001
48
+ puts user[:id] #=> 1001
54
49
 
55
50
  ```
56
51
 
data/demo.rb CHANGED
@@ -2,29 +2,24 @@ require 'js_obj'
2
2
 
3
3
  user = {
4
4
  id: 1001,
5
+ name: 'user1',
5
6
  position: {
6
7
  x: 10.5,
7
8
  y: -1.2
8
9
  }
9
10
  }
10
11
 
11
- # Get Property
12
+ # Get
13
+ puts user.id #=> 1001
14
+ puts user.position.x #=> 10.5
12
15
 
13
- puts user.id
14
- #=> 1001
15
- puts user.position.x
16
- #=> 10.5
17
-
18
- # Add property
19
-
20
- user.name = "user1"
21
- puts user.name
22
- #=> user1
16
+ # Set
17
+ user.name = "Jason"
18
+ puts user.name #=> "Jason"
23
19
 
20
+ # Add
24
21
  user.position.z = 9.8
25
- puts user.position.z
26
- #=> 9.8
22
+ puts user.position.z #=> 9.8
27
23
 
28
24
  # Usual way
29
- puts user[:id]
30
- #=> 1001
25
+ puts user[:id] #=> 1001
@@ -1,3 +1,3 @@
1
1
  module JsObj
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: js_obj
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Ota