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

Defined in:
lib/rom/model.rb

Instance Method Summary collapse

Instance Method Details

#[](input) ⇒ Object



56
57
58
# File 'lib/rom/model.rb', line 56

def [](input)
  new(input)
end

#param_key(name) ⇒ Object



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

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