Class: DYI::Stylesheet::StyleReference

Inherits:
Style
  • Object
show all
Defined in:
lib/dyi/stylesheet.rb

Overview

Since:

  • 1.0.0

Instance Attribute Summary collapse

Attributes inherited from Style

#body, #content_type, #media, #title

Instance Method Summary collapse

Methods inherited from Style

#has_uri_reference?, #write_as

Constructor Details

#initialize(href, content_type = 'text/css', options = {}) ⇒ StyleReference

Returns a new instance of StyleReference.

Since:

  • 1.0.0



73
74
75
76
# File 'lib/dyi/stylesheet.rb', line 73

def initialize(href, content_type='text/css', options={})
  super(nil, content_type, options)
  @href = href
end

Instance Attribute Details

#hrefString (readonly)

Returns a path of external style-sheet file.

Returns:

  • (String)

    a path of external style-sheet file

Since:

  • 1.0.0



71
72
73
# File 'lib/dyi/stylesheet.rb', line 71

def href
  @href
end

Instance Method Details

#include_external_file?Boolean

Returns whether this script contains reference of external style-sheet file.

Returns:

  • (Boolean)

    always returns true

Since:

  • 1.0.0



81
82
83
# File 'lib/dyi/stylesheet.rb', line 81

def include_external_file?
  true
end