Module: Card::Set::All::Path::CssFormat

Extended by:
Card::Set::AbstractFormat
Defined in:
card/tmpsets/set/mod008-card-mod-format/all/path.rb,
card/tmpsets/set/mod007-card-mod-format/all/path.rb

Instance Method Summary collapse

Instance Method Details

#contextualize_path(relative_path) ⇒ Object



62
63
64
65
66
67
68
69
70
71
# File 'card/tmpsets/set/mod008-card-mod-format/all/path.rb', line 62

def contextualize_path relative_path
  if Card.config.file_storage == :local
    # absolute paths lead to invalid assets path in css for cukes
    card_path relative_path
  else
    # ...but relative paths are problematic when machine output and
    # hard-coded assets (like fonts) are on different servers
    card_url relative_path
  end
end