Class: CustomFieldName

Inherits:
Object
  • Object
show all
Defined in:
app/values/custom_field_name.rb

Overview

Value object for calculating a custom field name.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(custom_field) ⇒ CustomFieldName

Returns a new instance of CustomFieldName.



9
10
11
# File 'app/values/custom_field_name.rb', line 9

def initialize(custom_field)
  @custom_field = custom_field
end

Instance Attribute Details

#custom_fieldObject (readonly)

Returns the value of attribute custom_field.



7
8
9
# File 'app/values/custom_field_name.rb', line 7

def custom_field
  @custom_field
end

Instance Method Details

#to_sObject



13
14
15
# File 'app/values/custom_field_name.rb', line 13

def to_s
  "#{field_slug}#{field_suffix}"
end