Class: ActiveStash::Reflector
- Inherits:
-
Object
- Object
- ActiveStash::Reflector
- Defined in:
- lib/active_stash/index_dsl.rb
Instance Method Summary collapse
- #associations ⇒ Object
- #fields ⇒ Object
-
#initialize(model_class) ⇒ Reflector
constructor
A new instance of Reflector.
Constructor Details
#initialize(model_class) ⇒ Reflector
Returns a new instance of Reflector.
273 274 275 |
# File 'lib/active_stash/index_dsl.rb', line 273 def initialize(model_class) @model_class = model_class end |
Instance Method Details
#associations ⇒ Object
281 282 283 |
# File 'lib/active_stash/index_dsl.rb', line 281 def associations @associations ||= ::ActiveStash::ModelReflection.associations(@model_class) end |
#fields ⇒ Object
277 278 279 |
# File 'lib/active_stash/index_dsl.rb', line 277 def fields @fields ||= ::ActiveStash::ModelReflection.fields(@model_class) end |