Class: NinjaModel::Reflection::MacroReflection
- Inherits:
-
Object
- Object
- NinjaModel::Reflection::MacroReflection
- Defined in:
- lib/ninja_model/reflection.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#macro ⇒ Object
readonly
Returns the value of attribute macro.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#ninja_model ⇒ Object
readonly
Returns the value of attribute ninja_model.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #class_name ⇒ Object
-
#initialize(macro, name, options, ninja_model) ⇒ MacroReflection
constructor
A new instance of MacroReflection.
- #klass ⇒ Object
Constructor Details
#initialize(macro, name, options, ninja_model) ⇒ MacroReflection
Returns a new instance of MacroReflection.
33 34 35 |
# File 'lib/ninja_model/reflection.rb', line 33 def initialize(macro, name, , ninja_model) @macro, @name, @options, @ninja_model = macro, name, , ninja_model end |
Instance Attribute Details
#macro ⇒ Object (readonly)
Returns the value of attribute macro.
37 38 39 |
# File 'lib/ninja_model/reflection.rb', line 37 def macro @macro end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
37 38 39 |
# File 'lib/ninja_model/reflection.rb', line 37 def name @name end |
#ninja_model ⇒ Object (readonly)
Returns the value of attribute ninja_model.
37 38 39 |
# File 'lib/ninja_model/reflection.rb', line 37 def ninja_model @ninja_model end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
37 38 39 |
# File 'lib/ninja_model/reflection.rb', line 37 def @options end |
Instance Method Details
#class_name ⇒ Object
43 44 45 |
# File 'lib/ninja_model/reflection.rb', line 43 def class_name @class_name ||= [:class_name] || derive_class_name end |
#klass ⇒ Object
39 40 41 |
# File 'lib/ninja_model/reflection.rb', line 39 def klass @klass ||= class_name.constantize end |