lib/vedeu/repositories/model.rb in vedeu-0.4.41 vs lib/vedeu/repositories/model.rb in vedeu-0.4.42

- old
+ new

@@ -1,13 +1,17 @@ +require 'vedeu/support/common' + module Vedeu # When included into a class, provides the mechanism to store the class in a # repository for later retrieval. # # @api private module Model + include Vedeu::Common + # @!attribute [rw] repository # @return [Vedeu::Repository] attr_accessor :repository # When {Vedeu::Model} is included in a class, the methods within this module @@ -92,22 +96,9 @@ def store repository.store(self) # if valid? end private - - # Removes the module part from the expression in the string. - # - # @example - # demodulize('Vedeu::DSL::Interface') # => "Interface" - # - # @param klass [Class|String] - # @return [void] - def demodulize(klass) - klass = klass.to_s - - klass[(klass.rindex('::') + 2)..-1] - end # Returns the DSL class name responsible for this model. # # @return [String] def dsl_class