Module: Sharepoint::Type

Instance Method Summary collapse

Instance Method Details

#initialize(site, data = nil) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/sharepoint-types.rb', line 5

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