Class: Castkit::Generators::Attribute

Inherits:
Base
  • Object
show all
Defined in:
lib/generators/attribute.rb

Overview

Generator for creating Castkit attribute definitions.

Generates a class inheriting from ‘Castkit::Attributes::Definition` and an optional spec file.

Example:

$ castkit generate attribute OptionalString required:false default:"N/A"

This will generate:

  • lib/castkit/attributes/optional_string.rb

  • spec/castkit/attributes/optional_string_spec.rb

See Also:

Method Summary

Methods inherited from Base

component, #create_component, #create_spec, source_root