module Photolayout
Constants
- VERSION
Public Class Methods
context()
click to toggle source
# File lib/photolayout.rb, line 40 def self.context @context ||= ExecJS.compile(source) end
layout(options, photos) { |item| ... }
click to toggle source
# File lib/photolayout.rb, line 44 def self.layout(options, photos) layout = Layout.new(options) photos.each do |photo| layout.add(photo) end layout.items.each do |item| yield(item) end end
source()
click to toggle source
# File lib/photolayout.rb, line 34 def self.source File.read( File.expand_path('../../dist/photolayout.js', __FILE__) ) end