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.



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

def initialize(custom_field)
  @custom_field = custom_field
end

Instance Attribute Details

#custom_fieldObject (readonly)

Returns the value of attribute custom_field.



5
6
7
# File 'app/values/custom_field_name.rb', line 5

def custom_field
  @custom_field
end

Instance Method Details

#to_sObject



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

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