module Phlex
Constants
- ATTRIBUTE_CACHE
- CACHED_FILES
- DEPLOYED_AT
- Escape
- Loader
- VERSION
Public Class Methods
Source
# File lib/phlex.rb, line 30 def self.__expand_attribute_cache__(file_path) unless CACHED_FILES.include?(file_path) CACHED_FILES << file_path Phlex::ATTRIBUTE_CACHE.expand(File.size(file_path)) end end
Source
# File lib/phlex.rb, line 38 def self.html(&block) HTML.call do |component| receiver = block.binding.receiver receiver.instance_variables.each do |ivar| next if component.instance_variable_defined?(ivar) value = receiver.instance_variable_get(ivar) component.instance_variable_set(ivar, value) end component.instance_exec(receiver, &block) end end
Source
# File lib/phlex.rb, line 54 def self.svg(&block) SVG.call do |component| receiver = block.binding.receiver receiver.instance_variables.each do |ivar| next if component.instance_variable_defined?(ivar) value = receiver.instance_variable_get(ivar) component.instance_variable_set(ivar, value) end component.instance_exec(receiver, &block) end end