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.
67 68 69 70 |
# File 'lib/gettext_simple_rails/model_inspector.rb', line 67 def initialize(clazz_inspector, name) @clazz_inspector = clazz_inspector @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
65 66 67 |
# File 'lib/gettext_simple_rails/model_inspector.rb', line 65 def name @name end |
Instance Method Details
#gettext_key ⇒ Object
72 73 74 |
# File 'lib/gettext_simple_rails/model_inspector.rb', line 72 def gettext_key return "models.attributes.#{@clazz_inspector.snake_name}.#{@name}" end |