Class: SimpleAMS::Document::PrimaryId
- Inherits:
-
Object
- Object
- SimpleAMS::Document::PrimaryId
- Defined in:
- lib/simple_ams/document/primary_id.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(options) ⇒ PrimaryId
constructor
A new instance of PrimaryId.
- #options ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(options) ⇒ PrimaryId
Returns a new instance of PrimaryId.
4 5 6 7 |
# File 'lib/simple_ams/document/primary_id.rb', line 4 def initialize() @options = @name = .primary_id.name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
2 3 4 |
# File 'lib/simple_ams/document/primary_id.rb', line 2 def name @name end |
Instance Method Details
#options ⇒ Object
17 18 19 |
# File 'lib/simple_ams/document/primary_id.rb', line 17 def @options.primary_id. end |
#value ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/simple_ams/document/primary_id.rb', line 9 def value if @options.serializer.respond_to?(name) @options.serializer.send(name) else @options.resource.send(name) end end |