Exception: Tweetwine::RequiredOptionError

Inherits:
Error
  • Object
show all
Defined in:
lib/tweetwine/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Error

status_code, #status_code

Constructor Details

#initialize(key, owner) ⇒ RequiredOptionError

Returns a new instance of RequiredOptionError.



27
28
29
# File 'lib/tweetwine/exceptions.rb', line 27

def initialize(key, owner)
  @key, @owner = key, owner
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



25
26
27
# File 'lib/tweetwine/exceptions.rb', line 25

def key
  @key
end

#ownerObject (readonly)

Returns the value of attribute owner.



25
26
27
# File 'lib/tweetwine/exceptions.rb', line 25

def owner
  @owner
end

Instance Method Details

#to_sObject



31
32
33
# File 'lib/tweetwine/exceptions.rb', line 31

def to_s
  "#{key} is required for #{owner}"
end