Class: Cabriolet::Models::LITManifestMapping
- Inherits:
-
Object
- Object
- Cabriolet::Models::LITManifestMapping
- Defined in:
- lib/cabriolet/models/lit_header.rb
Overview
Represents a single manifest mapping
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#group ⇒ Object
Returns the value of attribute group.
-
#internal_name ⇒ Object
Returns the value of attribute internal_name.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#original_name ⇒ Object
Returns the value of attribute original_name.
Instance Method Summary collapse
-
#css? ⇒ Boolean
Check if this is a CSS file.
-
#html? ⇒ Boolean
Check if this is an HTML file.
-
#image? ⇒ Boolean
Check if this is an image.
-
#initialize ⇒ LITManifestMapping
constructor
A new instance of LITManifestMapping.
Constructor Details
#initialize ⇒ LITManifestMapping
Returns a new instance of LITManifestMapping.
212 213 214 215 216 217 218 |
# File 'lib/cabriolet/models/lit_header.rb', line 212 def initialize @offset = 0 @internal_name = "" @original_name = "" @content_type = "" @group = 0 end |
Instance Attribute Details
#content_type ⇒ Object
Returns the value of attribute content_type.
209 210 211 |
# File 'lib/cabriolet/models/lit_header.rb', line 209 def content_type @content_type end |
#group ⇒ Object
Returns the value of attribute group.
209 210 211 |
# File 'lib/cabriolet/models/lit_header.rb', line 209 def group @group end |
#internal_name ⇒ Object
Returns the value of attribute internal_name.
209 210 211 |
# File 'lib/cabriolet/models/lit_header.rb', line 209 def internal_name @internal_name end |
#offset ⇒ Object
Returns the value of attribute offset.
209 210 211 |
# File 'lib/cabriolet/models/lit_header.rb', line 209 def offset @offset end |
#original_name ⇒ Object
Returns the value of attribute original_name.
209 210 211 |
# File 'lib/cabriolet/models/lit_header.rb', line 209 def original_name @original_name end |
Instance Method Details
#css? ⇒ Boolean
Check if this is a CSS file
230 231 232 |
# File 'lib/cabriolet/models/lit_header.rb', line 230 def css? content_type =~ /css/i end |
#html? ⇒ Boolean
Check if this is an HTML file
223 224 225 |
# File 'lib/cabriolet/models/lit_header.rb', line 223 def html? content_type =~ /html/i end |
#image? ⇒ Boolean
Check if this is an image
237 238 239 |
# File 'lib/cabriolet/models/lit_header.rb', line 237 def image? content_type =~ /image/i end |