Class: ActionView::Template::Types::Type
Relationships & Source Files | |
Inherits: | Object |
Defined in: | actionview/lib/action_view/template/types.rb |
Constant Summary
-
SET =
# File 'actionview/lib/action_view/template/types.rb', line 9Struct.new(:symbols).new([ :html, :text, :js, :css, :xml, :json ])
Class Method Summary
- .[](type)
- .new(symbol) ⇒ Type constructor
Instance Attribute Summary
- #symbol readonly
Instance Method Summary
Constructor Details
.new(symbol) ⇒ Type
Class Method Details
.[](type)
[ GitHub ]Instance Attribute Details
#symbol (readonly)
[ GitHub ]# File 'actionview/lib/action_view/template/types.rb', line 19
attr_reader :symbol
Instance Method Details
#==(type)
[ GitHub ]#ref Also known as: #to_sym
[ GitHub ]# File 'actionview/lib/action_view/template/types.rb', line 30
def ref @symbol end
#to_s Also known as: #to_str
[ GitHub ]# File 'actionview/lib/action_view/template/types.rb', line 25
def to_s @symbol.to_s end
#to_str
Alias for #to_s.
# File 'actionview/lib/action_view/template/types.rb', line 28
alias to_str to_s
#to_sym
Alias for #ref.
# File 'actionview/lib/action_view/template/types.rb', line 33
alias to_sym ref