Class: Upkeep::Replay::Fragment

Inherits:
Object
  • Object
show all
Includes:
Payload
Defined in:
lib/upkeep/replay.rb

Instance Method Summary collapse

Methods included from Payload

empty?, from_h

Instance Method Details

#to_hObject



161
162
163
164
165
166
167
168
169
170
171
# File 'lib/upkeep/replay.rb', line 161

def to_h
  payload = {
    type: type,
    controller_class: controller_class,
    template: template,
    locals: Replay.value_hash_to_h(locals)
  }.compact
  replay_assigns = Replay.value_hash_to_h(assigns)
  payload[:assigns] = replay_assigns if replay_assigns.any?
  payload
end

#typeObject



159
# File 'lib/upkeep/replay.rb', line 159

def type = "fragment"