Module: Card::Set::TypePlusRight::Mod::Script::HtmlFormat

Extended by:
AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod019-script/type_plus_right/mod/script.rb

Instance Method Summary collapse

Instance Method Details

#local_include_tagObject



44
45
46
47
48
# File 'platypus/tmp/set/gem-defaults/mod019-script/type_plus_right/mod/script.rb', line 44

def local_include_tag
  return unless local_url

  javascript_include_tag local_url
end

#local_urlObject



56
57
58
# File 'platypus/tmp/set/gem-defaults/mod019-script/type_plus_right/mod/script.rb', line 56

def local_url
  card.asset_output_url
end

#remote_include_tagsObject



50
51
52
53
54
# File 'platypus/tmp/set/gem-defaults/mod019-script/type_plus_right/mod/script.rb', line 50

def remote_include_tags
  map_remote_items do |tag_args|
    javascript_include_tag tag_args.delete("src"), tag_args
  end
end

#view: javascript_include_tagObject



40
41
42
# File 'platypus/tmp/set/gem-defaults/mod019-script/type_plus_right/mod/script.rb', line 40

view :javascript_include_tag, cache: :never do
  [remote_include_tags, local_include_tag].flatten.compact.join "\n"
end