Class: Sharepoint::ContextWebInformation

Inherits:
Object show all
Includes:
Type
Defined in:
lib/sharepoint-types.rb

Instance Attribute Summary

Attributes inherited from Object

#parent

Attributes inherited from ObjectProperties

#data, #site, #updated_data

Instance Method Summary collapse

Methods included from Type

#initialize

Methods inherited from Object

#copy, #destroy, #guid, #initialize, #reload, #save

Methods inherited from ObjectProperties

#add_properties, #add_property, #available_properties, #initialize

Instance Method Details

#is_up_to_date?Boolean

Returns:

  • (Boolean)


69
70
71
# File 'lib/sharepoint-types.rb', line 69

def is_up_to_date?
  DateTime.now < timeout_time
end

#issued_timeObject



60
61
62
63
# File 'lib/sharepoint-types.rb', line 60

def issued_time
  strtime = (form_digest_value.split ',').last
  DateTime.strptime strtime, '%d %b %Y %H:%M:%S %z'
end

#timeout_timeObject



65
66
67
# File 'lib/sharepoint-types.rb', line 65

def timeout_time
  issued_time + Rational(form_digest_timeout_seconds, 86400)
end