Module: Sharepoint::Type

Instance Method Summary collapse

Instance Method Details

#initialize(site, data = nil) ⇒ Object



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

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