natter 0.1.0 → 0.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b2654979a551d969bac208c18667ce2c7c74d7fc
4
- data.tar.gz: 5726246cb0c3fdde38783f6e4d77f97a46a3cc7c
3
+ metadata.gz: 13f97d6f2534d07f6f183f0bbd8a11ef49bab3a8
4
+ data.tar.gz: 7ff275a13e6e7aa256abb16f2a148f2c510b465a
5
5
  SHA512:
6
- metadata.gz: 89a96014d6139600ed0728d18dc030dc5f753e2e1a4676cd7dd522684b0fd0b11785c84661b192ba8cf69cfff84bbc9ec888b55983396e711fafb4179e70b6dd
7
- data.tar.gz: f6fd7870a3f35019341f6403791fc96c1a94c35c34d95ed0d3e3a099d2cd41d1ca9fb3b0573bc075821ef063d5778046c2cdf9445ad57dd1d5a82baf46a3d0cb
6
+ metadata.gz: 2eb357fc794b72db7015fdf2a8411184b03480cb94370e4a43aa4688c6d4bad64a8cc2869d69c71aacc9bbb7fa083ec0f6161647dd44ca4a624436be4bb08446
7
+ data.tar.gz: ff00c69847b2a7c05d691840b35082fcd2e2f8abf808d6a3db71aa35b48dfa7f2841eb8165127f346c02a6cdc526f568fb365f907f584053ccfc4f874fd026d3
data/lib/natter/entity.rb CHANGED
@@ -2,13 +2,12 @@ module Natter
2
2
  # Public: An entity is an attribute of an intent.
3
3
  class Entity
4
4
  attr_accessor :name, :type
5
- attr_reader :value
6
5
 
7
6
  # Public: Constructor.
8
7
  #
9
8
  # name - Must be unique within an individual intent.
10
9
  # type - One of the pre-defined EntityType constants (default: 'generic')
11
- # value - Will never be nil when generated by the parser but may be nil
10
+ # value - Will never be nil when generated by the parser but may be nil
12
11
  # for some rule definitions (default: nil).
13
12
  def initialize(name, type = EntityType::GENERIC, value = nil)
14
13
  @name = name
@@ -16,8 +15,15 @@ module Natter
16
15
  @value = value
17
16
  end
18
17
 
18
+ # Public: Set this entity's value.
19
+ #
20
+ # value - The new value.
21
+ def value=(v)
22
+ @value = v
23
+ end
24
+
19
25
  # Public: Returns the value of this entity.
20
- # If @type is `generic` then we just return @value, otherwise we will need
26
+ # If @type is `generic` then we just return @value, otherwise we will need
21
27
  # to verify/compute the value to return.
22
28
  #
23
29
  # Returns object or nil (if invalid @value)
@@ -37,4 +43,4 @@ module Natter
37
43
  GENERIC = 'generic'
38
44
  TIME = 'time'
39
45
  end
40
- end
46
+ end
@@ -1,3 +1,3 @@
1
1
  module Natter
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: natter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garry Pettet