class OEHClient::Meta::Touchpoint
Public Class Methods
create(workspace, data)
click to toggle source
create a new instance of the class using the data set and assig the workspace
# File lib/oehclient/meta/touchpoint.rb, line 8 def self.create(workspace, data) # create from the past data structure touchpoint_instance = OEHClient::Meta::Touchpoint.new(data) # assign the local workspace object touchpoint_instance.workspace = workspace # return the instance touchpoint_instance end
Public Instance Methods
interaction(interaction_name)
click to toggle source
retrieve a single touchpoint from the current workspace based on the name
# File lib/oehclient/meta/touchpoint.rb, line 31 def interaction(interaction_name) # create and return the instance of an interaction based on the name, current workspace, and current touchpoint OEHClient::Meta::Interaction.create(workspace, OEHClient::Meta::Interaction.find_by_name(self.class.session, interaction_name, space: workspace.id, params: {:site => id})) end
interactions()
click to toggle source
retrieve the full collection of touchpoints from the curent workspace
# File lib/oehclient/meta/touchpoint.rb, line 18 def interactions() # initialize the collection array interaction_collection = Array.new # retrieve the collection from ONE using the workspace reference and current touchpoint OEHClient::Meta::Interaction.get_collection(self.class.session, space: workspace.id, params: {:site => id}).each do | interaction_item | # create the instance of the interaction and add it to the collection interaction_collection << OEHClient::Meta::Interaction.create(workspace, interaction_item) end # return the collection to calling process interaction_collection end