Skip to content

Instantly share code, notes, and snippets.

@joegaudet
Created March 26, 2013 19:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save joegaudet/5248372 to your computer and use it in GitHub Desktop.
Save joegaudet/5248372 to your computer and use it in GitHub Desktop.
def get(path, params={})
if parms[:memoize]
unless instance_variable_defined?("@#{path}")
value = driver.sc_object_for_property_path("#{abs_path}.#{Util.to_camel_case(path)}")
instance_variable_set("@#{path}", value)
end
instance_variable_get("@#{path}")
else
driver.sc_object_for_property_path("#{abs_path}.#{Util.to_camel_case(path)}")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment