Module: Card::Set::All::Path::Format

Extended by:
Card::Set::AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod004-format/all/path.rb

Instance Method Summary collapse

Instance Method Details

#contextualize_path(relative_path) ⇒ Object

in base format (and therefore most other formats), even internal paths are rendered as absolute urls.



51
52
53
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/path.rb', line 51

def contextualize_path relative_path
  card_url relative_path
end

#path(opts = {}) ⇒ Object

bypasses all processing

Parameters:

  • opts (Hash, String) (defaults to: {})

    a String is treated as a complete path and

Options Hash (opts):

  • :mark (String, Card::Name, Integer, Symbol, Card)
  • :action (Symbol)

    card action (:create, :update, :delete)

  • :format (Symbol)
  • :card (Hash)
  • :no_mark (TrueClass)


42
43
44
45
46
47
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/path.rb', line 42

def path opts={}
  return opts unless opts.is_a? Hash

  path = Card::Path.new(card, opts)&.render
  contextualize_path path
end