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



162
163
164
# File 'lib/typespec.rb', line 162

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

Instance Method Details

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

Returns:

  • (Boolean)


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

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