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.



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

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



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

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