Sha256: 886535abed341d2912f0c3e71b8492388810c7d02f5531c6bad0c212b87938be

Contents?: true

Size: 1.74 KB

Versions: 2

Compression:

Stored size: 1.74 KB

Contents

{
  "$id": "https://raw.githubusercontent.com/tcd/ginny/master/schema/class.schema.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Ginny Class Definition",
  "description": "Used to generate a [class](https://ruby-doc.org/core-2.6.5/Class.html).",
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "attrs": {
      "description": "An array of `Ginny::Attr`s.",
      "type": "array",
      "items": {
        "$ref": "https://raw.githubusercontent.com/tcd/ginny/master/schema/attr.schema.json"
      }
    },
    "body": {
      "description": "String to write into the body of the class.",
      "type": "string"
    },
    "classify_name": {
      "description": "Set this to `false` to disable *classification* and use raw `name` input.",
      "type": "string"
    },
    "default_constructor": {
      "description": "If `true`, a method similar to [ActiveRecord::Base.create](https://apidock.com/rails/ActiveRecord/Persistence/ClassMethods/create) will be generated for the class.",
      "type": "boolean"
    },
    "description": {
      "description": "Description of the class. [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) is supported.",
      "type": "string"
    },
    "file_prefix": {
      "description": "String to prepend to the name of the generated file.",
      "type": "string"
    },
    "modules": {
      "description": "List of modules to declare the class inside.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "name": {
      "description": "Name of the class.",
      "type": "string"
    },
    "parent": {
      "description": "Name of a class to inherit from. (Ex: `YourNewClass < Parent`)",
      "type": "string"
    }
  }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ginny-0.6.3 schema/class.schema.json
ginny-0.6.2 schema/class.schema.json