Class: SupplejackApi::SchemaDefinition::SchemaObject
- Inherits:
-
Object
- Object
- SupplejackApi::SchemaDefinition::SchemaObject
- Defined in:
- app/models/supplejack_api/schema_definition.rb
Direct Known Subclasses
Defined Under Namespace
Classes: SchemaObjectBuilder
Constant Summary collapse
- ALLOWED_ATTRIBUTES =
ALLOWED_ATTRIBUTES.values.flatten
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, options, &block) ⇒ SchemaObject
constructor
A new instance of SchemaObject.
Constructor Details
#initialize(name, options, &block) ⇒ SchemaObject
Returns a new instance of SchemaObject.
90 91 92 93 94 95 96 97 |
# File 'app/models/supplejack_api/schema_definition.rb', line 90 def initialize(name, , &block) @name = name builder = SchemaObjectBuilder.new() builder.instance_eval(&block) if block_given? @options = builder. end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
88 89 90 |
# File 'app/models/supplejack_api/schema_definition.rb', line 88 def name @name end |