classy-adornments 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +10 -6
- data/VERSION +1 -1
- data/classy-adornments.gemspec +1 -1
- data/lib/classy_adornments.rb +1 -1
- data/spec/classy_adornments_spec.rb +6 -0
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -36,18 +36,22 @@ values.
|
|
36
36
|
class Relationship
|
37
37
|
include ClassyAdornments
|
38
38
|
|
39
|
-
adorn :dates,
|
39
|
+
adorn :dates, :array => true
|
40
|
+
adorn :fights, :array => true
|
40
41
|
end
|
41
42
|
|
42
43
|
romance = Relationship.new
|
43
44
|
|
44
|
-
romance.dates
|
45
|
+
romance.dates #=> [] Initialised with empty array
|
45
46
|
|
46
|
-
romance.dates(:wings)
|
47
|
-
romance.dates
|
47
|
+
romance.dates(:wings) #=> Value appended to array
|
48
|
+
romance.dates #=> [:wings]
|
48
49
|
|
49
|
-
romance.dates([:drive_thru,:tv_night])
|
50
|
-
romance.dates
|
50
|
+
romance.dates([:drive_thru,:tv_night]) #=> Array values also added
|
51
|
+
romance.dates #=> [:wings,:drive_thru,:tv_night]
|
52
|
+
|
53
|
+
romance.fights :dates, :guy_friend_tim #=> Multi-arguments appended also
|
54
|
+
romance.fights #=> [:dates, :guy_friend_tim]
|
51
55
|
|
52
56
|
= Copyright
|
53
57
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/classy-adornments.gemspec
CHANGED
data/lib/classy_adornments.rb
CHANGED
@@ -58,5 +58,11 @@ describe ClassyAdornments, "#adorn" do
|
|
58
58
|
subject.array_attr.should == [1,2,3]
|
59
59
|
end
|
60
60
|
|
61
|
+
it "should append groups of arguments" do
|
62
|
+
subject.array_attr.should == []
|
63
|
+
subject.array_attr 1
|
64
|
+
subject.array_attr 2, 3
|
65
|
+
subject.array_attr.should == [1,2,3]
|
66
|
+
end
|
61
67
|
end
|
62
68
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: classy-adornments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
- 1
|
9
8
|
- 2
|
10
|
-
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael Barton
|