Module: Typisch::Typed::ClassMethods

Defined in:
lib/typisch/typed.rb

Instance Method Summary collapse

Instance Method Details

#typeObject



46
47
48
# File 'lib/typisch/typed.rb', line 46

def type
  @type || raise("Forgot to register_type for Typisch::Typed class")
end

#type_of(property_name) ⇒ Object



50
51
52
# File 'lib/typisch/typed.rb', line 50

def type_of(property_name)
  type[property_name]
end

#version_type(key) ⇒ Object



62
63
64
# File 'lib/typisch/typed.rb', line 62

def version_type(key)
  version_types[key]
end

#version_typesObject



54
55
56
# File 'lib/typisch/typed.rb', line 54

def version_types
  @version_types ||= {}
end

#versionsObject



58
59
60
# File 'lib/typisch/typed.rb', line 58

def versions
  version_types.keys
end