Skip to content

Instantly share code, notes, and snippets.

@adambeynon
Created October 29, 2013 09:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adambeynon/7211710 to your computer and use it in GitHub Desktop.
Save adambeynon/7211710 to your computer and use it in GitHub Desktop.
Opal native with block
# Class.new
Foo = Class.new(Bar) do
def woosh
:kapow
end
end
# Native.new
LocalStorage = Native.new(`localStorage`) do
def [](key)
`getItem(key)`
end
def []=(key, value)
`setItem(key, value)`
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment