class Rpa::Asset
Public Class Methods
new(photo_map, options = {})
click to toggle source
# File lib/rpa/asset.rb, line 6 def initialize(photo_map, options = {}) @photo_map = photo_map @options = options end
Public Instance Methods
css()
click to toggle source
# File lib/rpa/asset.rb, line 21 def css path('app.css') end
html()
click to toggle source
# File lib/rpa/asset.rb, line 11 def html photo_map = @photo_map options = @options build('app.html.erb', binding) end
js()
click to toggle source
# File lib/rpa/asset.rb, line 17 def js path('app.js') end
Private Instance Methods
build(file, local_binding)
click to toggle source
# File lib/rpa/asset.rb, line 31 def build(file, local_binding) ERB.new(File.read(path(file))).result(local_binding) end
path(file)
click to toggle source
# File lib/rpa/asset.rb, line 27 def path(file) Rpa.root.join('templates', @options[:theme], file) end