Method: MicrosoftGraph::Collection#<<

Defined in:
lib/microsoft_graph/collection.rb

#<<(value) ⇒ Object



29
30
31
32
33
34
35
36
37
38
# File 'lib/microsoft_graph/collection.rb', line 29

def <<(value)
  unless @type.valid_value?(value)
    raise MicrosoftGraph::TypeError.new(
      "Value \"#{value}\" does not match type #{@type.member_type.name}"
    )
  end
  @dirty = true
  @internal_values << value
  self
end