Exception: MdRecord::RecordNotFound

Inherits:
StandardError
  • Object
show all
Defined in:
lib/md_record/record_not_found.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, model: nil, slug: nil) ⇒ RecordNotFound

Returns a new instance of RecordNotFound.



7
8
9
10
11
# File 'lib/md_record/record_not_found.rb', line 7

def initialize(message = nil, model: nil, slug: nil)
  @model = model
  @slug = slug
  super(message || default_message)
end

Instance Attribute Details

#modelObject (readonly)

Returns the value of attribute model.



5
6
7
# File 'lib/md_record/record_not_found.rb', line 5

def model
  @model
end

#slugObject (readonly)

Returns the value of attribute slug.



5
6
7
# File 'lib/md_record/record_not_found.rb', line 5

def slug
  @slug
end