module Greenin

Public: Greenin settings module You can customize entity method name and entity class name

Examples

Greenin.entity_method_name = 'form_ent'
Greenin.entity_class_name = 'Ent'

User::Ent
# => User::Ent
User.form_ent
# => User::Entity
User.all.form_ent
# => #<User::Entity:0x007fb4610d8a00
     @object=#<ActiveRecord::Relation [...]>, @options={}>
User.first.form_ent
# => #<User::Entity:0x007fb462263090 @object=
     #<User id: nil, ..., created_at: nil, updated_at: nil>, @options={}>

Constants

VERSION

Public Class Methods

setup() { |self| ... } click to toggle source
# File lib/greenin.rb, line 28
def self.setup
  yield self
end