Class: Typespec::Object

Inherits:
Struct
  • Object
show all
Defined in:
lib/typespec.rb

Overview

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Struct

#initialize

Constructor Details

This class inherits a constructor from Typespec::Struct

Class Method Details

.[](*properties, **properties_with_spec) ⇒ Object



165
166
167
# File 'lib/typespec.rb', line 165

def self.[](*properties, **properties_with_spec)
  Typespec::Object.new(*properties, **properties_with_spec)
end

Instance Method Details

#valid?(object, opts = {}) ⇒ Boolean

Returns:

  • (Boolean)


169
170
171
# File 'lib/typespec.rb', line 169

def valid?(object, opts={})
  super(object, opts.merge({:ignore_if_not_in_spec => true}))
end