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 CHANGED
@@ -36,18 +36,22 @@ values.
36
36
  class Relationship
37
37
  include ClassyAdornments
38
38
 
39
- adorn :dates, :array => true
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 #=> [] Initialised with empty array
45
+ romance.dates #=> [] Initialised with empty array
45
46
 
46
- romance.dates(:wings) #=> Value appended to array
47
- romance.dates #=> [:wings]
47
+ romance.dates(:wings) #=> Value appended to array
48
+ romance.dates #=> [:wings]
48
49
 
49
- romance.dates([:drive_thru,:tv_night]) #=> Array values also added
50
- romance.dates #=> [:wings,:drive_thru,:tv_night]
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.2
1
+ 0.2.0
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{classy-adornments}
8
- s.version = "0.1.2"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Barton"]
@@ -33,7 +33,7 @@ module ClassyAdornments
33
33
  when Array
34
34
  instance_variable_get(var).concat args.first
35
35
  else
36
- instance_variable_get(var) << args.first
36
+ instance_variable_get(var).concat args
37
37
  end
38
38
  end
39
39
  end
@@ -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: 31
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 1
9
8
  - 2
10
- version: 0.1.2
9
+ - 0
10
+ version: 0.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Barton