Sha256: 6503571061348914f2cf4e171b520c5cbd586ba82efd724428d84f1f70d5c417
Contents?: true
Size: 668 Bytes
Versions: 14
Compression:
Stored size: 668 Bytes
Contents
module Rbexy module Nodes class ComponentProp < AbstractAttr def precompile [ComponentProp.new(name, precompile_value)] end def compile key = ActiveSupport::Inflector.underscore(name) "#{key}: #{value.compile}" end private def precompile_value node = value.precompile.first case node when Raw Raw.new(node.content, template: Raw::EXPR_STRING) when ExpressionGroup ExpressionGroup.new(node.members, outer_template: ExpressionGroup::SUB_EXPR, inner_template: node.inner_template) else node end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems