ActionView::Template::Types::Type Ruby on Rails 5.1.2 Class ActionView::Template::Types::Type < Object actionview/lib/action_view/template/types.rb Methods # ==, [] N new R ref T to_s, to_str, to_sym Constants SET = Struct.new(:symbols).new([ :html, :text, :js, :css, :xml, :json ]) Attributes [R] symbol Class Public methods [](type) Link Source: show | on GitHub # File actionview/lib/action_view/template/types.rb, line 9 def self.[](type) if type.is_a?(self) type else new(type) end end new(symbol) Link Source: show | on GitHub # File actionview/lib/action_view/template/types.rb, line 19 def initialize(symbol) @symbol = symbol.to_sym end Instance Public methods ==(type) Link Source: show | on GitHub # File actionview/lib/action_view/template/types.rb, line 33 def ==(type) @symbol == type.to_sym unless type.blank? end ref() Link Also aliased as: to_sym Source: show | on GitHub # File actionview/lib/action_view/template/types.rb, line 28 def ref @symbol end to_s() Link Also aliased as: to_str Source: show | on GitHub # File actionview/lib/action_view/template/types.rb, line 23 def to_s @symbol.to_s end to_str() Link Alias for: to_s to_sym() Link Alias for: ref