Class: Cabriolet::Models::LITManifestMapping

Inherits:
Object
  • Object
show all
Defined in:
lib/cabriolet/models/lit_header.rb

Overview

Represents a single manifest mapping

Instance Attribute Summary collapse

Instance Method Summary collapse

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

Returns:

  • (Boolean) —

    true if CSS



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

Returns:

  • (Boolean) —

    true if HTML



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

Returns:

  • (Boolean) —

    true if image



237
238
239
# File 'lib/cabriolet/models/lit_header.rb', line 237

def image?
  content_type =~ /image/i
end