class RGen::MetamodelBuilder::Intermediate::Attribute
Constants
- Defaults
- Properties
- Types
Public Class Methods
default_value(prop)
click to toggle source
# File lib/rgen/metamodel_builder/intermediate/feature.rb, line 77 def self.default_value(prop) Defaults[prop] end
new(type, props)
click to toggle source
# File lib/rgen/metamodel_builder/intermediate/feature.rb, line 85 def initialize(type, props) @props = Defaults.merge(props) type ||= String @etype = Types[type] if @etype @impl_type = type elsif type.is_a?(RGen::MetamodelBuilder::DataTypes::Enum) @etype = :EEnumerable @impl_type = type else raise ArgumentError.new("invalid type '#{type}'") end if @props[:derived] @props[:changeable] = false @props[:volatile] = true @props[:transient] = true end check(Properties) end
properties()
click to toggle source
# File lib/rgen/metamodel_builder/intermediate/feature.rb, line 81 def self.properties Properties.keys.sort{|a,b| a.to_s <=> b.to_s} end