Sha256: 0fe64e4ac43cca856b90a7928c83cfde501b987fe9f886c2b6596c09a18a3c06

Contents?: true

Size: 794 Bytes

Versions: 6

Compression:

Stored size: 794 Bytes

Contents

module RailsConnector

class WorkspaceDataFromService
  def initialize(data)
    @data = data
  end

  def revision_id
    @data["revision_id"]
  end

  def id
    @data["id"]
  end

  # remove this method after DynamoCmsBackend has been removed from the Cloud Connector
  def content_cache_id=(id)
    # ignore, since not using content caches
  end

  def content_state_id
    @data['content_state_id']
  end

  def content_state
    @content_state ||= ContentState.find_or_create(content_state_id) if content_state_id
  end

  def diff
    @data['diff']
  end

  def changes
    diff && diff['changes']
  end

  def from_content_state_id
    diff && diff['from_content_state_id']
  end

  def to_content_state_id
    diff && diff['to_content_state_id']
  end
end

end # module RailsConnector

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
infopark_cloud_connector-6.8.3.174.51542603 lib/rails_connector/workspace_data_from_service.rb
infopark_cloud_connector-6.8.3.115.227021242 lib/rails_connector/workspace_data_from_service.rb
infopark_cloud_connector-6.8.3.73.75172665 lib/rails_connector/workspace_data_from_service.rb
infopark_cloud_connector-6.8.3.2.153416031 lib/rails_connector/workspace_data_from_service.rb
infopark_cloud_connector-6.8.3.67.110847540 lib/rails_connector/workspace_data_from_service.rb
infopark_cloud_connector-6.8.3.1.23895778 lib/rails_connector/workspace_data_from_service.rb