Class: GettextSimpleRails::ModelInspector::Attribute
- Inherits:
-
Object
- Object
- GettextSimpleRails::ModelInspector::Attribute
- Defined in:
- lib/gettext_simple_rails/model_inspector.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #gettext_key ⇒ Object
-
#initialize(clazz_inspector, name) ⇒ Attribute
constructor
A new instance of Attribute.
Constructor Details
#initialize(clazz_inspector, name) ⇒ Attribute
Returns a new instance of Attribute.
63 64 65 66 |
# File 'lib/gettext_simple_rails/model_inspector.rb', line 63 def initialize(clazz_inspector, name) @clazz_inspector = clazz_inspector @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
61 62 63 |
# File 'lib/gettext_simple_rails/model_inspector.rb', line 61 def name @name end |
Instance Method Details
#gettext_key ⇒ Object
68 69 70 |
# File 'lib/gettext_simple_rails/model_inspector.rb', line 68 def gettext_key return "models.attributes.#{@clazz_inspector.snake_name}.#{@name}" end |