lib/linodians/employee.rb in linodians-1.0.0 vs lib/linodians/employee.rb in linodians-1.0.1

- old
+ new

@@ -9,11 +9,11 @@ @data = Cymbal.symbolize params @data.freeze end def photo - @photo ||= open(PHOTO_URL % username) { |x| x.read } + @photo ||= open(PHOTO_URL % username, &:read) end def [](value) @data[value.to_sym] end @@ -32,10 +32,10 @@ private def method_missing(method, *args, &block) return super unless @data.key?(method) - instance_eval "def #{method}() @data[:'#{method}'] end" + define_singleton_method(method) { @data[method] } send(method) end end end