conversational 0.4.1 → 0.4.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.
@@ -1,18 +1,19 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- conversational (0.4.0)
4
+ conversational (0.4.1)
5
5
  activesupport
6
6
  i18n
7
7
 
8
8
  GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
- activesupport (3.1.0)
11
+ activesupport (3.2.0)
12
+ i18n (~> 0.6)
12
13
  multi_json (~> 1.0)
13
14
  diff-lcs (1.1.2)
14
- i18n (0.5.0)
15
- multi_json (1.0.3)
15
+ i18n (0.6.0)
16
+ multi_json (1.0.4)
16
17
  rake (0.9.2)
17
18
  rspec (2.5.0)
18
19
  rspec-core (~> 2.5.0)
@@ -18,64 +18,62 @@ module Conversational
18
18
  end
19
19
  end
20
20
 
21
- module InstanceMethods
22
- # Returns the specific sublass of conversation based from the topic
23
- # Example:
24
- #
25
- # <tt>
26
- # Class Conversation
27
- # include Conversational::Conversation
28
- # end
29
- #
30
- # Class HelloConversation < Conversation
31
- # end
32
- #
33
- # Class GoodbyeConversation < Conversation
34
- # end
35
- #
36
- # hello = Conversation.new("someone", "hello")
37
- # hello.details => #<HelloConversation topic: "hello", with: "someone">
38
- #
39
- # unknown = Conversation.new("someone", "cheese")
40
- # unknown.details => nil
41
- #
42
- # Conversation.unknown_topic_subclass = HelloConversation
43
- #
44
- # unknown = Conversation.new("someone", "cheese")
45
- # unknown.details => #<HelloConversation topic: "cheese", with: "someone">
46
- #
47
- # blank = Conversation.new("someone")
48
- # blank.details => nil
49
- #
50
- # Conversation.blank_topic_subclass = GoodbyeConversation
51
- #
52
- # blank = Conversation.new("someone")
53
- # blank.details => #<GoodbyeConversation topic: nil, with: "someone">
54
- #
55
- # Conversation.exclude HelloConversation
56
- #
57
- # hello = Conversation.new("someone", "hello")
58
- # hello.details => nil
59
- #
60
- # hello.details(:include_all => true) => #<HelloConversation topic: "hello", with: "someone">
61
- #
62
- # </tt>
63
- def details(options = {})
64
- details_subclass = Conversational::Conversation.find_subclass_by_topic(
65
- topic, options
66
- )
67
- if details_subclass
68
- self.respond_to?(:becomes) ?
69
- becomes(details_subclass) :
70
- Conversational::Conversation.becomes(
71
- details_subclass, self
72
- )
73
- end
21
+ # Returns the specific sublass of conversation based from the topic
22
+ # Example:
23
+ #
24
+ # <tt>
25
+ # Class Conversation
26
+ # include Conversational::Conversation
27
+ # end
28
+ #
29
+ # Class HelloConversation < Conversation
30
+ # end
31
+ #
32
+ # Class GoodbyeConversation < Conversation
33
+ # end
34
+ #
35
+ # hello = Conversation.new("someone", "hello")
36
+ # hello.details => #<HelloConversation topic: "hello", with: "someone">
37
+ #
38
+ # unknown = Conversation.new("someone", "cheese")
39
+ # unknown.details => nil
40
+ #
41
+ # Conversation.unknown_topic_subclass = HelloConversation
42
+ #
43
+ # unknown = Conversation.new("someone", "cheese")
44
+ # unknown.details => #<HelloConversation topic: "cheese", with: "someone">
45
+ #
46
+ # blank = Conversation.new("someone")
47
+ # blank.details => nil
48
+ #
49
+ # Conversation.blank_topic_subclass = GoodbyeConversation
50
+ #
51
+ # blank = Conversation.new("someone")
52
+ # blank.details => #<GoodbyeConversation topic: nil, with: "someone">
53
+ #
54
+ # Conversation.exclude HelloConversation
55
+ #
56
+ # hello = Conversation.new("someone", "hello")
57
+ # hello.details => nil
58
+ #
59
+ # hello.details(:include_all => true) => #<HelloConversation topic: "hello", with: "someone">
60
+ #
61
+ # </tt>
62
+ def details(options = {})
63
+ details_subclass = Conversational::Conversation.find_subclass_by_topic(
64
+ topic, options
65
+ )
66
+ if details_subclass
67
+ self.respond_to?(:becomes) ?
68
+ becomes(details_subclass) :
69
+ Conversational::Conversation.becomes(
70
+ details_subclass, self
71
+ )
74
72
  end
73
+ end
75
74
 
76
- def topic_defined?
77
- details_subclass = Conversational::Conversation.topic_defined?(topic)
78
- end
75
+ def topic_defined?
76
+ details_subclass = Conversational::Conversation.topic_defined?(topic)
79
77
  end
80
78
 
81
79
  module ClassMethods
@@ -277,4 +275,3 @@ module Conversational
277
275
  end
278
276
  end
279
277
  end
280
-
@@ -1,4 +1,4 @@
1
1
  module Conversational
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conversational
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-30 00:00:00.000000000Z
12
+ date: 2012-01-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &82126960 !ruby/object:Gem::Requirement
16
+ requirement: &78604790 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *82126960
24
+ version_requirements: *78604790
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: i18n
27
- requirement: &82126750 !ruby/object:Gem::Requirement
27
+ requirement: &78604570 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *82126750
35
+ version_requirements: *78604570
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &82126510 !ruby/object:Gem::Requirement
38
+ requirement: &78604340 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *82126510
46
+ version_requirements: *78604340
47
47
  description: Allows you to instansiate conversations based on keywords
48
48
  email:
49
49
  - dwilkie@gmail.com
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  version: '0'
85
85
  requirements: []
86
86
  rubyforge_project: conversational
87
- rubygems_version: 1.8.10
87
+ rubygems_version: 1.8.15
88
88
  signing_key:
89
89
  specification_version: 3
90
90
  summary: Have topic based conversations