dont patch over existing string method
This commit is contained in:
parent
d19bd5f98d
commit
7c33f19bee
@ -1,5 +1,5 @@
|
|||||||
class String
|
class String
|
||||||
def camelize
|
def camelise
|
||||||
self.split("_").collect{|str| str.capitalize_first }.join
|
self.split("_").collect{|str| str.capitalize_first }.join
|
||||||
end
|
end
|
||||||
def capitalize_first
|
def capitalize_first
|
||||||
|
@ -180,7 +180,7 @@ module Risc
|
|||||||
when Parfait::Object
|
when Parfait::Object
|
||||||
type = Parfait.object_space.get_class_by_name( object.class.name.split("::").last.to_sym).instance_type
|
type = Parfait.object_space.get_class_by_name( object.class.name.split("::").last.to_sym).instance_type
|
||||||
when Symbol
|
when Symbol
|
||||||
object = object.to_s.camelize.to_sym
|
object = object.to_s.camelise.to_sym
|
||||||
clazz = Parfait.object_space.get_class_by_name(object)
|
clazz = Parfait.object_space.get_class_by_name(object)
|
||||||
raise "Not implemented/found object #{object}:#{object.class}" unless clazz
|
raise "Not implemented/found object #{object}:#{object.class}" unless clazz
|
||||||
type = clazz.instance_type
|
type = clazz.instance_type
|
||||||
|
Loading…
Reference in New Issue
Block a user