Class: ActionView::Template::RawFile
- Defined in:
- actionview/lib/action_view/template/raw_file.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#format ⇒ Object
Returns the value of attribute format.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #formats ⇒ Object
- #identifier ⇒ Object
-
#initialize(filename) ⇒ RawFile
constructor
A new instance of RawFile.
- #render(*args) ⇒ Object
Constructor Details
#initialize(filename) ⇒ RawFile
Returns a new instance of RawFile.
9 10 11 12 13 14 |
# File 'actionview/lib/action_view/template/raw_file.rb', line 9 def initialize(filename) @filename = filename.to_s extname = ::File.extname(filename).delete(".") @type = Template::Types[extname] || Template::Types[:text] @format = @type.symbol end |
Instance Attribute Details
#format ⇒ Object
Returns the value of attribute format
7 8 9 |
# File 'actionview/lib/action_view/template/raw_file.rb', line 7 def format @format end |
#type ⇒ Object
Returns the value of attribute type
7 8 9 |
# File 'actionview/lib/action_view/template/raw_file.rb', line 7 def type @type end |