Class: FlowReport

Inherits:
Object
  • Object
show all
Defined in:
lib/taft_files/framework/zznamezz/watir/flows/flow_objects.rb

Overview

A class defining feedback to be returned after invoking the flow. TODO : rework this so that it knows how to gather the required information (?)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value = nil) ⇒ FlowReport

Returns a new instance of FlowReport.



450
451
452
453
# File 'lib/taft_files/framework/zznamezz/watir/flows/flow_objects.rb', line 450

def initialize(value = nil)
  # do nothing?
  @value = value
end

Instance Attribute Details

#valueObject

attr_accessor :success, :message, :value_hash_array

# success is a boolean
# message is a string
# value_hash_array is an array of hashes, one per object/event/thing. Its keys are the object's fields, and the

values are their values

def initialize(success, message, value_hash_array)
  @success = success
  @message = message
  @value_hash_array = value_hash_array
end

def to_s
  s = ""
  s += "Flow report : success? #{@success}. Message : #{@message}. Values : #{@value_hash_array}"
  s
end


448
449
450
# File 'lib/taft_files/framework/zznamezz/watir/flows/flow_objects.rb', line 448

def value
  @value
end

Instance Method Details

#generate_reportObject



461
462
463
464
# File 'lib/taft_files/framework/zznamezz/watir/flows/flow_objects.rb', line 461

def generate_report
  #TODO
  ""
end

#to_sObject



455
456
457
458
459
# File 'lib/taft_files/framework/zznamezz/watir/flows/flow_objects.rb', line 455

def to_s
  s = ""
  s += "Flow report : value : #{@value}"
  s
end