Class: Meta::JsonSchema::ObjectSchemaBuilder::Locked
- Inherits:
-
Object
- Object
- Meta::JsonSchema::ObjectSchemaBuilder::Locked
- Includes:
- LockedMethodAlias
- Defined in:
- lib/meta/json_schema/builders/object_schema_builder.rb
Defined Under Namespace
Modules: LockedMethodAlias
Instance Attribute Summary collapse
-
#locked_options ⇒ Object
readonly
Returns the value of attribute locked_options.
-
#object_schema_builder ⇒ Object
readonly
Returns the value of attribute object_schema_builder.
Instance Method Summary collapse
-
#initialize(builder, **locked_options) ⇒ Locked
constructor
locked_options 是用户传递的参数,这个参数会被合并到 object_schema_builder 的 locked_options 中。.
- #locked(options) ⇒ Object
- #to_schema ⇒ Object
Methods included from LockedMethodAlias
#add_scope, #lock, #method_missing
Constructor Details
#initialize(builder, **locked_options) ⇒ Locked
locked_options 是用户传递的参数,这个参数会被合并到 object_schema_builder 的 locked_options 中。
39 40 41 42 |
# File 'lib/meta/json_schema/builders/object_schema_builder.rb', line 39 def initialize(builder, **) @object_schema_builder = builder @locked_options = SchemaOptions::UserOptions::Filter.check(.compact) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Meta::JsonSchema::ObjectSchemaBuilder::Locked::LockedMethodAlias
Instance Attribute Details
#locked_options ⇒ Object (readonly)
Returns the value of attribute locked_options.
36 37 38 |
# File 'lib/meta/json_schema/builders/object_schema_builder.rb', line 36 def @locked_options end |
#object_schema_builder ⇒ Object (readonly)
Returns the value of attribute object_schema_builder.
36 37 38 |
# File 'lib/meta/json_schema/builders/object_schema_builder.rb', line 36 def object_schema_builder @object_schema_builder end |
Instance Method Details
#locked(options) ⇒ Object
48 49 50 51 52 |
# File 'lib/meta/json_schema/builders/object_schema_builder.rb', line 48 def locked() = SchemaOptions::UserOptions::Filter.check() = ObjectSchema.(, ) Locked.new(self.object_schema_builder, **) end |
#to_schema ⇒ Object
44 45 46 |
# File 'lib/meta/json_schema/builders/object_schema_builder.rb', line 44 def to_schema object_schema_builder.to_schema() end |