class Envoi::Aspera::WatchService::Client::SnapshotEntry

Public Class Methods

new(data) click to toggle source
# File lib/envoi/aspera/watch_service/client.rb, line 34
def initialize(data)
  # @attributes = data.is_a?(MatchData) ? { path: data[:path], stat_as_json: data[:stat_as_json] } : data
  merge! data
end
new_from_match_data(match_data) click to toggle source
# File lib/envoi/aspera/watch_service/client.rb, line 51
def self.new_from_match_data(match_data)
  new(match_data.named_captures)
end

Public Instance Methods

path() click to toggle source
# File lib/envoi/aspera/watch_service/client.rb, line 39
def path; self[:path] end
stat() click to toggle source
# File lib/envoi/aspera/watch_service/client.rb, line 41
def stat
  self[:stat] ||= begin
    json = self[:stat_as_json]
    JSON.parse(json) if json
  end
end
stat_as_json() click to toggle source
# File lib/envoi/aspera/watch_service/client.rb, line 48
def stat_as_json; self[:stat_as_json] end