snidely_whiplash 1.0.0 → 1.0.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.
@@ -1,3 +1,3 @@
1
1
  class SnidelyWhiplash
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -10,8 +10,12 @@ class SnidelyWhiplash
10
10
  "{{#{@path || ''}}}"
11
11
  end
12
12
 
13
- def method_missing(method, *args, &block)
14
- SnidelyWhiplash.new(@path.nil? ? method.to_s : "#{@path}.#{method.to_s}")
13
+ def method_missing(method_sym, *args, &block)
14
+ SnidelyWhiplash.new(@path.nil? ? method_sym.to_s : "#{@path}.#{method_sym.to_s}")
15
+ end
16
+
17
+ def respond_to?(method_sym, include_private=false)
18
+ Object.new.respond_to? method_sym, include_private
15
19
  end
16
20
 
17
21
  end
@@ -19,4 +19,11 @@ describe SnidelyWhiplash do
19
19
  obj.example.to_s.should eql '{{parent.example}}'
20
20
  obj.nested.example.to_s.should eql '{{parent.nested.example}}'
21
21
  end
22
+
23
+ # This particular example comes from a problem I ran into with haml
24
+ it "should not try to convert to an array" do
25
+ obj = SnidelyWhiplash.new
26
+ ary = [obj]
27
+ ary.flatten.should eql [obj]
28
+ end
22
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snidely_whiplash
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: