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)


57
58
59
# File 'lib/sharepoint-types.rb', line 57

def is_up_to_date?
  DateTime.now < timeout_time
end

#issued_timeObject



48
49
50
51
# File 'lib/sharepoint-types.rb', line 48

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

#timeout_timeObject



53
54
55
# File 'lib/sharepoint-types.rb', line 53

def timeout_time
  issued_time + Rational(form_digest_timeout_seconds, 86400)
end