campfiyah 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,8 +15,12 @@ module Campfiyah
15
15
  end
16
16
  end
17
17
 
18
- def find_room(name)
18
+ def room_by_id(id)
19
+ rooms.find {|r| r.id == id}
20
+ end
21
+
22
+ def room_by_name(name)
19
23
  rooms.find {|r| r.name == name}
20
24
  end
21
25
  end
22
- end
26
+ end
@@ -1,3 +1,3 @@
1
1
  module Campfiyah
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -10,8 +10,12 @@ describe Campfiyah::Account do
10
10
  room.id.should_not be_nil
11
11
  room.name.should_not be_nil
12
12
 
13
- room = account.find_room("The Danger Room")
13
+ room = account.room_by_name("The Danger Room")
14
+ room.message("woot").should be
15
+
16
+ room = account.room_by_id(123456)
17
+ room.name.should eql("The Danger Room")
14
18
  room.message("woot").should be
15
19
  end
16
20
  end
17
- end
21
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: campfiyah
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:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-09 00:00:00.000000000 Z
12
+ date: 2013-05-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: yajl-ruby