Class: Grumlin::StepsSerializers::String

Inherits:
Serializer
  • Object
show all
Defined in:
lib/grumlin/steps_serializers/string.rb

Instance Method Summary collapse

Instance Method Details

#serializeObject

constructor params: apply_shortcuts: true|false, default: false constructor params: anonymous: true|false, default: false TODO: add pretty



8
9
10
11
12
13
14
15
16
# File 'lib/grumlin/steps_serializers/string.rb', line 8

def serialize
  steps = @params[:apply_shortcuts] ? Grumlin::ShortcutsApplyer.call(@steps) : @steps

  steps = [steps.configuration_steps, steps.steps].map do |stps|
    stps.map { |step| serialize_step(step) }
  end

  "#{prefix}.#{(steps[0] + steps[1]).join(".")}"
end