url-of ( object -- url ) (original) (raw)
Inputs
object | an object |
---|
Outputs
url | a string |
---|
Generic word contract
Outputs a link to a page displaying a presentation of the given object. This word is called when write-object is called on html-writer instances.
Definition
GENERIC: url-of ( object -- url )
Methods
USING: accessors html.streams io.pathnames kernel sequences
splitting ;
M: pathname url-of
string>> "resource:" ?head
[ "https://github.com/factor/factor/blob/master/" prepend ]
[ drop f ] if ;