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)


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

def is_up_to_date?
  DateTime.now < timeout_time
end

#issued_timeObject



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

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

#timeout_timeObject



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

def timeout_time
  issued_time + Rational(form_digest_timeout_seconds, 86400)
end