Module: JavaScriptElementProxyExtraction

Defined in:
lib/rjs/if/javascript_element_proxy_extraction.rb

Instance Method Summary collapse

Instance Method Details

#respond_to?(name) ⇒ Boolean

Returns:

  • (Boolean)


2
3
4
5
# File 'lib/rjs/if/javascript_element_proxy_extraction.rb', line 2

def respond_to?(name)
  return true if name.to_sym == :to_script
  super
end

#to_scriptObject



7
8
9
# File 'lib/rjs/if/javascript_element_proxy_extraction.rb', line 7

def to_script
  @script ||= @generator.instance_variable_get("@lines").pop.chomp(';')
end