roleplay 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/roleplay.rb CHANGED
@@ -6,6 +6,16 @@ module Roleplay
6
6
  base.send(:extend, ClassMethods)
7
7
  end
8
8
 
9
+ def playing(name)
10
+ modules = self.class.roles[name]
11
+ value = self.dup
12
+ modules.each do |m|
13
+ value.extend m
14
+ end
15
+ value
16
+ end
17
+ alias :as_a :playing
18
+
9
19
  module ClassMethods
10
20
 
11
21
  attr_accessor :roles
@@ -1,3 +1,3 @@
1
1
  module Roleplay
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/roleplay.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |gem|
9
9
  gem.authors = ["James Martin"]
10
10
  gem.email = ["jmartin2683@gmail.com"]
11
11
  gem.description = %q{roles for ruby}
12
- gem.summary = %q{group modules into 'roles' and include them into individual model instances}
12
+ gem.summary = %q{group modules into 'roles' and include them into individual instances}
13
13
  gem.homepage = "http://www.thoughtsonrails.com"
14
14
 
15
15
  gem.files = `git ls-files`.split($/)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roleplay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -67,7 +67,7 @@ rubyforge_project:
67
67
  rubygems_version: 1.8.24
68
68
  signing_key:
69
69
  specification_version: 3
70
- summary: group modules into 'roles' and include them into individual model instances
70
+ summary: group modules into 'roles' and include them into individual instances
71
71
  test_files:
72
72
  - spec/roleplay_spec.rb
73
73
  - spec/spec_helper.rb