Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (23 sloc) 0.491 kb
module FactoryGirl
class Decorator
class ClassKeyHash < Decorator
def [](key)
@component[symbolized_key key]
end
def []=(key, value)
@component[symbolized_key key] = value
end
def key?(key)
@component.key? symbolized_key(key)
end
private
def symbolized_key(key)
if key.respond_to?(:to_sym)
key.to_sym
else
key.to_s.underscore.to_sym
end
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.