mitchellh-rubyuw 0.3.1 → 0.4.0

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.
Files changed (5) hide show
  1. data/VERSION +1 -1
  2. data/lib/myuw/sln.rb +8 -2
  3. data/lib/myuw.rb +2 -1
  4. data/rubyuw.gemspec +1 -1
  5. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.4.0
data/lib/myuw/sln.rb CHANGED
@@ -3,14 +3,14 @@ class MyUW
3
3
  # Gets information regarding a specific SLN, returning
4
4
  # information in a SLN object.
5
5
  class SLNInfo
6
- attr_accessor :term
6
+ attr_reader :term
7
7
  attr_reader :sln
8
8
  attr_accessor :myuw
9
9
  attr_reader :data
10
10
 
11
11
  def initialize(myuw)
12
12
  @myuw = myuw
13
- @term = "AUT+2009"
13
+ @term = nil
14
14
  @data = nil
15
15
  @sln = nil
16
16
  end
@@ -21,6 +21,12 @@ class MyUW
21
21
  @data = nil
22
22
  end
23
23
 
24
+ # Custom setter for term to reset data
25
+ def term=(value)
26
+ @term = value
27
+ @data = nil
28
+ end
29
+
24
30
  # Fetches the information for the given SLN.
25
31
  def fetch_data
26
32
  raise("SLN not set.") if @sln.nil?
data/lib/myuw.rb CHANGED
@@ -46,9 +46,10 @@ class MyUW
46
46
  end
47
47
 
48
48
  # Creates a new SLN object and returns it
49
- def sln(sln_number)
49
+ def sln(sln_number, term)
50
50
  sln_obj = SLNInfo.new(self)
51
51
  sln_obj.sln = sln_number
52
+ sln_obj.term = term
52
53
  return sln_obj
53
54
  end
54
55
  end
data/rubyuw.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rubyuw}
5
- s.version = "0.3.1"
5
+ s.version = "0.4.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Mitchell Hashimoto"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mitchellh-rubyuw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mitchell Hashimoto