soup 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/snip.rb +5 -1
  2. data/lib/soup.rb +1 -1
  3. metadata +40 -33
data/lib/snip.rb CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  # Based on Builder's BlankSlate object
4
4
  class EmptyClass
5
- instance_methods.each { |m| undef_method(m) unless m =~ /^(__|instance_eval)/ }
5
+ instance_methods.each { |m| undef_method(m) unless m =~ /^(__|instance_eval|respond_to\?)/ }
6
6
  end
7
7
 
8
8
  # methods called on Tuple:
@@ -58,6 +58,10 @@ class Snip < EmptyClass
58
58
  attributes.each { |name, value| set_value(name, value) }
59
59
  end
60
60
 
61
+ def respond_to?(method)
62
+ attributes.keys.include?(method.to_s)
63
+ end
64
+
61
65
  def save
62
66
  raise "Saving would be pointless - there's no data!" if @tuples.empty?
63
67
  set_id_if_necessary
data/lib/soup.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'snip'
2
2
 
3
3
  module Soup
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
 
6
6
  DEFAULT_CONFIG = {
7
7
  :adapter => 'sqlite3',
metadata CHANGED
@@ -1,33 +1,26 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
3
- specification_version: 1
4
2
  name: soup
5
3
  version: !ruby/object:Gem::Version
6
- version: 0.1.2
7
- date: 2008-03-06 00:00:00 +00:00
8
- summary: A mess of data
9
- require_paths:
10
- - lib
11
- email: james at lazyatom dot com
12
- homepage:
13
- rubyforge_project:
14
- description:
15
- autorequire:
16
- default_executable:
17
- bindir: bin
18
- has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
20
- requirements:
21
- - - ">"
22
- - !ruby/object:Gem::Version
23
- version: 0.0.0
24
- version:
4
+ version: 0.1.3
25
5
  platform: ruby
26
- signing_key:
27
- cert_chain:
28
- post_install_message:
29
6
  authors:
30
7
  - James Adam
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-03-11 00:00:00 +00:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description:
17
+ email: james at lazyatom dot com
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README
31
24
  files:
32
25
  - lib/active_record_tuple.rb
33
26
  - lib/data_mapper_tuple.rb
@@ -35,17 +28,31 @@ files:
35
28
  - lib/snip.rb
36
29
  - lib/soup.rb
37
30
  - README
38
- test_files: []
39
-
31
+ has_rdoc: true
32
+ homepage:
33
+ post_install_message:
40
34
  rdoc_options: []
41
35
 
42
- extra_rdoc_files:
43
- - README
44
- executables: []
45
-
46
- extensions: []
47
-
36
+ require_paths:
37
+ - lib
38
+ required_ruby_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: "0"
43
+ version:
44
+ required_rubygems_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: "0"
49
+ version:
48
50
  requirements: []
49
51
 
50
- dependencies: []
52
+ rubyforge_project:
53
+ rubygems_version: 0.9.5
54
+ signing_key:
55
+ specification_version: 2
56
+ summary: A mess of data
57
+ test_files: []
51
58