muster 0.0.5 → 0.0.6

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.
@@ -160,7 +160,15 @@ module Muster
160
160
  value = self[meth]
161
161
 
162
162
  if value.kind_of?(Hash)
163
- value = OpenStruct.new(value)
163
+ value.instance_eval do
164
+ def method_missing(meth, *args, &block)
165
+ if self.has_key?(meth)
166
+ return self.fetch(meth)
167
+ end
168
+
169
+ super
170
+ end
171
+ end
164
172
  end
165
173
 
166
174
  return value
@@ -1,4 +1,4 @@
1
1
  module Muster
2
2
  # Current version of Muster
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
@@ -92,12 +92,14 @@ describe Muster::Results do
92
92
  results.name.should eq [1, 2, 3]
93
93
  end
94
94
 
95
- it 'returns an OpenStruct for a hash' do
95
+ it 'returns a Hash with method missing dot notation' do
96
96
  data[:pagination] = {:page => 1, :per_page => 10}
97
97
 
98
- results.pagination.should be_an_instance_of(OpenStruct)
98
+ results.pagination.should be_an_kind_of(Hash)
99
99
  results.pagination.page.should eq 1
100
100
  results.pagination.per_page.should eq 10
101
+ results.pagination[:page].should eq 1
102
+ results.pagination[:per_page].should eq 10
101
103
  end
102
104
  end
103
105
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: