Class: HQ::Resource::Column
- Inherits:
-
Object
- Object
- HQ::Resource::Column
- Defined in:
- lib/hq/resource.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #display_name ⇒ Object
-
#initialize(klass:, name:) ⇒ Column
constructor
A new instance of Column.
Constructor Details
#initialize(klass:, name:) ⇒ Column
Returns a new instance of Column.
34 35 36 37 |
# File 'lib/hq/resource.rb', line 34 def initialize(klass:, name:) @klass = klass @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
32 33 34 |
# File 'lib/hq/resource.rb', line 32 def name @name end |
Instance Method Details
#display_name ⇒ Object
41 42 43 44 45 46 |
# File 'lib/hq/resource.rb', line 41 def display_name @display_name ||= begin display_name = name.dup display_name.tr("_", " ").titleize end end |