Class: Rumbly::Model::Klass
- Inherits:
-
Object
- Object
- Rumbly::Model::Klass
- Extended by:
- Abstract
- Defined in:
- lib/rumbly/model/klass.rb
Overview
This is an abstract class that represents a single model class within an MVC application. Object mapper-specific implementations should subclass this class and implement the following methods: name
, attributes
, operations
, abstract
, and virtual
.
Direct Known Subclasses
Constant Summary collapse
- ATTRIBUTES =
Attributes and default values of a Klass
{ name: '', attributes: [], operations: [], abstract: false, virtual: false }
Instance Method Summary collapse
-
#<=>(other) ⇒ Object
Compares
Klass
objects using thename
attribute. -
#abstract? ⇒ Boolean
Simple question mark-style wrapper for the Klass#abstract attribute.
-
#virtual? ⇒ Boolean
Simple question mark-style wrapper for the Klass#virtual attribute.
Methods included from Abstract
Instance Method Details
#<=>(other) ⇒ Object
Compares Klass
objects using the name
attribute.
32 33 34 |
# File 'lib/rumbly/model/klass.rb', line 32 def <=> (other) name <=> other.name end |
#abstract? ⇒ Boolean
Simple question mark-style wrapper for the Klass#abstract attribute.
22 23 24 |
# File 'lib/rumbly/model/klass.rb', line 22 def abstract? abstract end |
#virtual? ⇒ Boolean
Simple question mark-style wrapper for the Klass#virtual attribute.
27 28 29 |
# File 'lib/rumbly/model/klass.rb', line 27 def virtual? virtual end |