Class: Smash::CloudPowers::SmashError::ErrorCollection

Inherits:
Struct
  • Object
show all
Defined in:
lib/cloud_powers/smash_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#maxObject

Returns the value of attribute max

Returns:

  • (Object)

    the current value of max



10
11
12
# File 'lib/cloud_powers/smash_error.rb', line 10

def max
  @max
end

#storageObject

Returns the value of attribute storage

Returns:

  • (Object)

    the current value of storage



10
11
12
# File 'lib/cloud_powers/smash_error.rb', line 10

def storage
  @storage
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



10
11
12
# File 'lib/cloud_powers/smash_error.rb', line 10

def type
  @type
end

Instance Method Details

#push!(err_msg) ⇒ Object



11
12
13
14
# File 'lib/cloud_powers/smash_error.rb', line 11

def push!(err_msg)
  storage << err_msg
  throw :die if storage[type].count >= max
end