hashie 0.1.0 → 0.1.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.
data/.gitignore CHANGED
@@ -2,4 +2,4 @@
2
2
  .DS_Store
3
3
  coverage
4
4
  rdoc
5
- pkg
5
+ pkg
@@ -50,13 +50,14 @@ can set defaults for each property.
50
50
  property :email
51
51
  property :occupation, :default => 'Rubyist'
52
52
  end
53
-
53
+
54
54
  p = Person.new
55
55
  p.name # => nil
56
- p.occupation # => 'Rubyist'
57
56
  p.email = 'abc@def.com'
58
- p.email # => 'abc@def.com'
59
- p['awesome'] # => NoMethodError
57
+ p.occupation # => 'Rubyist'
58
+ p.email # => 'abc@def.com'
59
+ p[:awesome] # => NoMethodError
60
+ p[:occupation] # => 'Rubyist'
60
61
 
61
62
 
62
63
  == Note on Patches/Pull Requests
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.2
@@ -0,0 +1,63 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{hashie}
8
+ s.version = "0.1.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Michael Bleigh"]
12
+ s.date = %q{2009-11-12}
13
+ s.description = %q{Hashie is a small collection of tools that make hashes more powerful. Currently includes Mash (Mocking Hash) and Dash (Discrete Hash).}
14
+ s.email = %q{michael@intridea.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ "LICENSE",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION",
26
+ "hashie.gemspec",
27
+ "lib/hashie.rb",
28
+ "lib/hashie/dash.rb",
29
+ "lib/hashie/hash.rb",
30
+ "lib/hashie/hash_extensions.rb",
31
+ "lib/hashie/mash.rb",
32
+ "spec/hashie/dash_spec.rb",
33
+ "spec/hashie/hash_spec.rb",
34
+ "spec/hashie/mash_spec.rb",
35
+ "spec/spec.opts",
36
+ "spec/spec_helper.rb"
37
+ ]
38
+ s.homepage = %q{http://github.com/intridea/hashie}
39
+ s.rdoc_options = ["--charset=UTF-8"]
40
+ s.require_paths = ["lib"]
41
+ s.rubygems_version = %q{1.3.5}
42
+ s.summary = %q{Your friendly neighborhood hash toolkit.}
43
+ s.test_files = [
44
+ "spec/hashie/dash_spec.rb",
45
+ "spec/hashie/hash_spec.rb",
46
+ "spec/hashie/mash_spec.rb",
47
+ "spec/spec_helper.rb"
48
+ ]
49
+
50
+ if s.respond_to? :specification_version then
51
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
52
+ s.specification_version = 3
53
+
54
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
55
+ s.add_development_dependency(%q<rspec>, [">= 0"])
56
+ else
57
+ s.add_dependency(%q<rspec>, [">= 0"])
58
+ end
59
+ else
60
+ s.add_dependency(%q<rspec>, [">= 0"])
61
+ end
62
+ end
63
+
@@ -56,7 +56,7 @@ module Hashie
56
56
  # Retrieve a value from the Dash (will return the
57
57
  # property's default value if it hasn't been set).
58
58
  def [](property_name)
59
- super || self.class.defaults[property_name.to_sym]
59
+ super(property_name.to_sym) || self.class.defaults[property_name.to_sym]
60
60
  end
61
61
 
62
62
  # Set a value on the Dash in a Hash-like way. Only works
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hashie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bleigh
@@ -38,6 +38,7 @@ files:
38
38
  - README.rdoc
39
39
  - Rakefile
40
40
  - VERSION
41
+ - hashie.gemspec
41
42
  - lib/hashie.rb
42
43
  - lib/hashie/dash.rb
43
44
  - lib/hashie/hash.rb