Module: ActiveModel::Naming

Defined in:
lib/mumukit/core/activemodel.rb

Instance Method Summary collapse

Instance Method Details

#demodulized_model_nameObject



10
11
12
13
14
# File 'lib/mumukit/core/activemodel.rb', line 10

def demodulized_model_name
  define_singleton_method :model_name do
    ActiveModel::Name.new(self, nil, name.demodulize)
  end
end

#name_model_as(other) ⇒ Object



4
5
6
7
8
# File 'lib/mumukit/core/activemodel.rb', line 4

def name_model_as(other)
  define_singleton_method :model_name do
    other.model_name
  end
end