class method
self.[]
Ruby on Rails 4.0.13
Since v4.0.13 Last seen in v7.0.10Signature
self.[](type)
No documentation comment.
Parameters
-
typereq
Source
# File actionpack/lib/action_view/template/types.rb, line 17
def self.[](type)
return type if type.is_a?(self)
if type.is_a?(Symbol) || types.member?(type.to_s)
new(type)
end
end
Defined in actionpack/lib/action_view/template/types.rb line 17
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Template::Types::Type