Sha256: 31d5ad5728799dd1c38785ce6ccf5dc086dfe827c50f305c9c7665ffa1a7281d

Contents?: true

Size: 399 Bytes

Versions: 1

Compression:

Stored size: 399 Bytes

Contents

module OData
  class ComplexType < Type
    attr_reader :base_type

    def initialize(options = {})
      super
      @base_type = options[:base_type]
      @service   = options[:service]
    end

    def properties
      @properties ||= @service.properties_for_type(name)
    end

    def valid_value?(value)
      value.respond_to?(:odata_type) && self.name == value.odata_type
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
microsoft_graph-0.1.2 lib/odata/types/complex_type.rb