Class: Browserbeam::StepError

Inherits:
Struct
  • Object
show all
Defined in:
lib/browserbeam/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#actionObject

Returns the value of attribute action

Returns:

  • (Object)

    the current value of action



69
70
71
# File 'lib/browserbeam/types.rb', line 69

def action
  @action
end

#codeObject

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



69
70
71
# File 'lib/browserbeam/types.rb', line 69

def code
  @code
end

#contextObject

Returns the value of attribute context

Returns:

  • (Object)

    the current value of context



69
70
71
# File 'lib/browserbeam/types.rb', line 69

def context
  @context
end

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



69
70
71
# File 'lib/browserbeam/types.rb', line 69

def message
  @message
end

#stepObject

Returns the value of attribute step

Returns:

  • (Object)

    the current value of step



69
70
71
# File 'lib/browserbeam/types.rb', line 69

def step
  @step
end

Class Method Details

.from_hash(data) ⇒ Object



70
71
72
73
74
75
76
77
78
79
# File 'lib/browserbeam/types.rb', line 70

def self.from_hash(data)
  return nil unless data.is_a?(Hash)
  new(
    step: data["step"] || 0,
    action: data["action"] || "",
    code: data["code"] || "",
    message: data["message"] || "",
    context: data["context"] || {},
  )
end