Class: Icss::Meta::SimpleSchema
- Inherits:
-
NamedSchema
- Object
- NamedSchema
- Icss::Meta::SimpleSchema
- Defined in:
- lib/icss/type/structured_schema.rb,
lib/icss/type.rb
Overview
Description of a simple type (derived from one of the base classes)
Simple uses the type name “simple” and supports the attributes:
-
name: a string naming this fixed (required).
-
namespace, a string that qualifies the name;
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from NamedSchema
Instance Method Summary collapse
- #basename=(s) ⇒ Object
- #fullname ⇒ Object
- #parent_klass ⇒ Object
- #parent_metamodels ⇒ Object
- #receive_basename(s) ⇒ Object
- #type ⇒ Object
Methods inherited from NamedSchema
#attrs_to_inscribe, #is_core?, #model_klass, receive, #to_hash
Methods included from ReceiverModel::ActsAsHash
#[], #[]=, #attributes, #delete, included, #keys, #to_hash
Methods included from RecordModel
#attr_set?, included, #receive!, #to_zaml
Instance Method Details
#basename=(s) ⇒ Object
267 268 269 270 271 |
# File 'lib/icss/type/structured_schema.rb', line 267 def basename=(s) segs = s.to_s.split(/\./) @basename = segs.pop.to_sym @namespace = segs.join('.').to_s if segs.present? end |
#fullname ⇒ Object
274 275 276 |
# File 'lib/icss/type/structured_schema.rb', line 274 def fullname [namespace, basename].compact_blank.join('.') end |
#parent_klass ⇒ Object
280 |
# File 'lib/icss/type/structured_schema.rb', line 280 def parent_klass() is_a.first ; end |
#parent_metamodels ⇒ Object
281 282 283 284 |
# File 'lib/icss/type/structured_schema.rb', line 281 def () return [] if is_a.length <= 1 is_a[1 .. -1].map{|pk| pk. if pk.respond_to?(:metamodel) }.compact end |
#receive_basename(s) ⇒ Object
272 |
# File 'lib/icss/type/structured_schema.rb', line 272 def receive_basename(s) self.basename = s.to_sym ; end |
#type ⇒ Object
278 |
# File 'lib/icss/type/structured_schema.rb', line 278 def type() :simple ; end |