Class: Sail::Types::ObjModel

Inherits:
Type
  • Object
show all
Defined in:
lib/sail/types/obj_model.rb

Overview

ObjModel

The ObjModel type returns the constant for a given string saved. For example:

If the saved value is “Post”, it will return Post (actual class).

Instance Method Summary collapse

Methods inherited from Type

#from, #initialize

Constructor Details

This class inherits a constructor from Sail::Types::Type

Instance Method Details

#to_valueObject



14
15
16
# File 'lib/sail/types/obj_model.rb', line 14

def to_value
  @setting.value.constantize
end