Class: ActiveStorage::AwsRecord::Attachment::NullBlobRelation
- Inherits:
-
Object
- Object
- ActiveStorage::AwsRecord::Attachment::NullBlobRelation
- Includes:
- Enumerable
- Defined in:
- lib/active_storage/aws_record/attachment.rb
Overview
Empty relation backing Blob#attachments.
Instance Method Summary collapse
- #any? ⇒ Boolean
- #each(&block) ⇒ Object
- #empty? ⇒ Boolean
- #find ⇒ Object
-
#initialize(persisted) ⇒ NullBlobRelation
constructor
A new instance of NullBlobRelation.
- #to_a ⇒ Object (also: #to_ary)
Constructor Details
#initialize(persisted) ⇒ NullBlobRelation
Returns a new instance of NullBlobRelation.
384 385 386 |
# File 'lib/active_storage/aws_record/attachment.rb', line 384 def initialize(persisted) @persisted = persisted end |
Instance Method Details
#any? ⇒ Boolean
404 405 406 407 |
# File 'lib/active_storage/aws_record/attachment.rb', line 404 def any? guard! false end |
#each(&block) ⇒ Object
388 389 390 391 |
# File 'lib/active_storage/aws_record/attachment.rb', line 388 def each(&block) guard! [].each(&block) end |
#empty? ⇒ Boolean
409 410 411 412 |
# File 'lib/active_storage/aws_record/attachment.rb', line 409 def empty? guard! true end |
#find ⇒ Object
393 394 395 396 |
# File 'lib/active_storage/aws_record/attachment.rb', line 393 def find(*) guard! nil end |
#to_a ⇒ Object Also known as: to_ary
398 399 400 401 |
# File 'lib/active_storage/aws_record/attachment.rb', line 398 def to_a guard! [] end |