I hereby claim:
- I am jgaskins on github.
- I am jgaskins (https://keybase.io/jgaskins) on keybase.
- I have a public key ASCed-Umwz9z8RWPBYomPslpI7TsIMEXNySBh0B0pVOcrAo
To claim this, I am signing this object:
require 'opal' | |
require 'clearwater' | |
require 'routing' | |
class Layout | |
include Clearwater::Component | |
include Routing | |
def render | |
div([ |
require 'opal' | |
require 'clearwater' | |
require 'clearwater/memoized_component' | |
class Layout | |
include Clearwater::Component | |
def render | |
div([ | |
Tabs.memoize( |
class Foo { | |
constructor(bar) { this.bar = bar } | |
getBar() { return this.bar } | |
setBar(newBar) { this.bar = newBar } | |
} | |
function FuncFoo(bar) { | |
function getBar() { return bar } | |
function setBar(newBar) { bar = newBar } |
class TimeTravel | |
include Clearwater::Component | |
# @param store [GrandCentral::VersionedStore] | |
def initialize(store) | |
@store = store | |
end | |
def render | |
div([ |
# app/controllers/messages_controller.rb | |
class MessagesController < ApplicationController | |
def show | |
message = Message.find(params[:id]) | |
respond_to do |format| | |
format.json { render :show, locals: { message: message } } | |
end | |
end | |
end |
class Episode | |
def self.from_rss_feed(url) | |
xml = Nokogiri.parse(Net::HTTP.get(URI(url))) | |
xml.xpath('//channel/item').map do |item| | |
new( | |
title: item.at_xpath('title').text, | |
subtitle: item.at_xpath('itunes:subtitle').text, | |
link: item.at_xpath('link').text, | |
audio_url: item.at_xpath('enclosure')[:url], | |
duration: item.at_xpath('itunes:duration').text |
# Wrapper for a UI component that needs to maintain its own state | |
class Toggle | |
include Clearwater::BlackBoxNode | |
attr_reader :app, :component :state | |
def initialize(state=false) | |
@state = state | |
end |
class MyHash | |
include Enumerable | |
def initialize(data=nil, capacity=11) | |
@capacity = capacity | |
@data = Array.new(capacity) { [] } | |
@keys = [] | |
return unless data | |
data.each do |key, value| |
require 'opal' | |
require 'clearwater' | |
require 'profile_page' | |
class Layout | |
include Clearwater::Component | |
def render | |
ProfilePage.new('yoxtb') |
I hereby claim:
To claim this, I am signing this object: