Skip to content

Commit

Permalink
Merge branch 'support-class-variables-in-attr-binding' of https://git…
Browse files Browse the repository at this point in the history
…hub.com/pencilcheck/volt into pencilcheck-support-class-variables-in-attr-binding
  • Loading branch information
ryanstout committed May 5, 2015
2 parents 2126d7c + ad85c7d commit 384efef
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/volt/server/html_parser/attribute_scope.rb
Expand Up @@ -71,7 +71,13 @@ def getter_to_setter(getter)
getter = getter.strip.gsub(/\(\s*\)/, '')

# Check to see if this can be converted to a setter
if getter[0] =~ /^[a-z_]/ && getter[-1] != ')'
if getter[0] =~ /^[A-Z]/ && getter[-1] != ')'
if getter.index('.')
"#{getter}=(val)"
else
"raise \"could not auto generate setter for `#{getter}`\""
end
elsif getter[0] =~ /^[a-z_]/ && getter[-1] != ')'
# Convert a getter into a setter
if getter.index('.') || getter.index('@')
prefix = ''
Expand Down

0 comments on commit 384efef

Please sign in to comment.