class Creamerscript::Sweeteners::PropertyInvocation

Public Instance Methods

pattern() click to toggle source
# File lib/creamerscript/sweeteners/property_invocation.rb, line 4
def pattern
  /\(#{SYMBOL} #{SYMBOL}\)/
end
property_name() click to toggle source
# File lib/creamerscript/sweeteners/property_invocation.rb, line 16
def property_name
  body.split.last
end
subject() click to toggle source
# File lib/creamerscript/sweeteners/property_invocation.rb, line 12
def subject
  body.split.first
end
to_coffee() click to toggle source
# File lib/creamerscript/sweeteners/property_invocation.rb, line 8
def to_coffee
  "#{subject}.#{property_name}"
end

Private Instance Methods

body() click to toggle source
# File lib/creamerscript/sweeteners/property_invocation.rb, line 22
def body
  source[1..-2]
end