Class: ActiveShrine::Attached::Base
- Inherits:
-
Object
- Object
- ActiveShrine::Attached::Base
- Defined in:
- lib/active_shrine/attached/base.rb
Overview
ActiveShrineAttachedBase
Abstract base class for the concrete ActiveShrine::Attached::One and ActiveShrine::Attached::Many classes that both provide proxy access to the attachment association for a record.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
-
#initialize(name, record) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(name, record) ⇒ Base
Returns a new instance of Base.
12 13 14 15 |
# File 'lib/active_shrine/attached/base.rb', line 12 def initialize(name, record) @name = name @record = record end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/active_shrine/attached/base.rb', line 10 def name @name end |
#record ⇒ Object (readonly)
Returns the value of attribute record.
10 11 12 |
# File 'lib/active_shrine/attached/base.rb', line 10 def record @record end |