Module: Sharepoint::Type

Instance Method Summary collapse

Instance Method Details

#initialize(site, data = nil) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/sharepoint-types.rb', line 18

def initialize site, data = nil
  data               ||= Hash.new
  data['__metadata'] ||= {
    'type' => "SP.#{self.class.name.split('::').last}"
  }
  super site, data
end