Class: Dunlop::OverdueHandling::WorkflowStepBaseDate

Inherits:
Object
  • Object
show all
Defined in:
app/services/dunlop/overdue_handling.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(workflow_step, config) ⇒ WorkflowStepBaseDate

Returns a new instance of WorkflowStepBaseDate.



108
109
110
# File 'app/services/dunlop/overdue_handling.rb', line 108

def initialize(workflow_step, config)
  @workflow_step, @config = workflow_step, config
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



107
108
109
# File 'app/services/dunlop/overdue_handling.rb', line 107

def config
  @config
end

#workflow_stepObject (readonly)

Returns the value of attribute workflow_step.



107
108
109
# File 'app/services/dunlop/overdue_handling.rb', line 107

def workflow_step
  @workflow_step
end

Instance Method Details

#fieldObject



120
121
122
# File 'app/services/dunlop/overdue_handling.rb', line 120

def field
  is_nested? ? config.values.first : config
end

#is_nested?Boolean

Returns:

  • (Boolean)


112
113
114
# File 'app/services/dunlop/overdue_handling.rb', line 112

def is_nested?
  config.is_a?(Hash)
end

#keyObject



116
117
118
# File 'app/services/dunlop/overdue_handling.rb', line 116

def key
  is_nested? ? config.keys.first : config
end