Class: FallbackAssets::HtmlAsset

Inherits:
Object
  • Object
show all
Defined in:
lib/fallback_assets/html_asset.rb

Instance Method Summary collapse

Constructor Details

#initialize(asset) ⇒ HtmlAsset

Returns a new instance of HtmlAsset.



5
6
7
# File 'lib/fallback_assets/html_asset.rb', line 5

def initialize(asset)
  @asset = asset
end

Instance Method Details



13
14
15
# File 'lib/fallback_assets/html_asset.rb', line 13

def create_link
  "<link rel=\"stylesheet\" href=\"#{@asset}\" />"
end

#create_scriptObject



9
10
11
# File 'lib/fallback_assets/html_asset.rb', line 9

def create_script
  "<script src=\"#{@asset}\"></script>"
end