Class: Passifier::UrlSource

Inherits:
Object
  • Object
show all
Defined in:
lib/passifier/url_source.rb

Overview

Asset derived from a url Used to pull in the background images

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, url) ⇒ UrlSource

Returns a new instance of UrlSource.

Parameters:

  • name (String, Symbol)

    The name of the asset

  • url (String)

    The url to request the asset content from



14
15
16
17
18
# File 'lib/passifier/url_source.rb', line 14

def initialize(name, url)
  @name = name
  @url = url
  populate_content
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



9
10
11
# File 'lib/passifier/url_source.rb', line 9

def content
  @content
end

#nameObject (readonly) Also known as: filename

Returns the value of attribute name.



9
10
11
# File 'lib/passifier/url_source.rb', line 9

def name
  @name
end

#urlObject (readonly)

Returns the value of attribute url.



9
10
11
# File 'lib/passifier/url_source.rb', line 9

def url
  @url
end