Module: ROM::Model::Params::ClassMethods

Defined in:
lib/rom/model.rb

Instance Method Summary collapse

Instance Method Details

#[](input) ⇒ Object



58
59
60
# File 'lib/rom/model.rb', line 58

def [](input)
  new(input)
end

#param_key(name) ⇒ Object



50
51
52
53
54
55
56
# File 'lib/rom/model.rb', line 50

def param_key(name)
  class_eval "    def self.model_name\n      @model_name ||= ActiveModel::Name.new(self, nil, \#{name.to_s.inspect})\n    end\n  RUBY\nend\n"