Exception: ActionTimer::InvalidType

Inherits:
Exception
  • Object
show all
Defined in:
lib/actiontimer/Exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(g, e) ⇒ InvalidType

Returns a new instance of InvalidType.



12
13
14
15
# File 'lib/actiontimer/Exceptions.rb', line 12

def initialize(g,e)
    @given = given
    @expected = e
end

Instance Attribute Details

#expectedObject (readonly)

Returns the value of attribute expected.



11
12
13
# File 'lib/actiontimer/Exceptions.rb', line 11

def expected
  @expected
end

#givenObject (readonly)

Returns the value of attribute given.



10
11
12
# File 'lib/actiontimer/Exceptions.rb', line 10

def given
  @given
end

Instance Method Details

#to_sObject



17
18
19
# File 'lib/actiontimer/Exceptions.rb', line 17

def to_s
    "Given type: #{g} Expected type: #{e}"
end