Class: Sharepoint::FieldLookup

Inherits:
Field show all
Defined in:
lib/sharepoint-fields.rb

Direct Known Subclasses

FieldUser

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

#createObject


73
74
75
# File 'lib/sharepoint-fields.rb', line 73

def create
  @site.query :post, create_uri, { parameters: @data }.to_json
end

#create_uriObject


65
66
67
68
69
70
71
# File 'lib/sharepoint-fields.rb', line 65

def create_uri
  unless parent.nil?
    parent.['uri'] + '/fields/addfield'
  else
    'fields/addfield'
  end
end