Class: Js2bookmarklet

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

Constant Summary collapse

"Drag me to your bookmarks"

Instance Method Summary collapse

Constructor Details

#initialize(input = "", options = {}) ⇒ Js2bookmarklet

Returns a new instance of Js2bookmarklet.



12
13
14
15
16
# File 'lib/js2bookmarklet.rb', line 12

def initialize(input = "", options = {})
  @in = input
  @out = ""
  @options = options
end

Instance Method Details

#to_bookmarkletObject



18
19
20
21
22
23
# File 'lib/js2bookmarklet.rb', line 18

def to_bookmarklet
  minify
  escape
  add_link
  @out
end