Class: Wings::ActiveFedoraAttributes
- Inherits:
-
Object
- Object
- Wings::ActiveFedoraAttributes
- Defined in:
- lib/wings/converter_value_mapper.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes) ⇒ ActiveFedoraAttributes
constructor
A new instance of ActiveFedoraAttributes.
- #result ⇒ Object
Constructor Details
#initialize(attributes) ⇒ ActiveFedoraAttributes
Returns a new instance of ActiveFedoraAttributes.
248 249 250 |
# File 'lib/wings/converter_value_mapper.rb', line 248 def initialize(attributes) @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
246 247 248 |
# File 'lib/wings/converter_value_mapper.rb', line 246 def attributes @attributes end |
Class Method Details
.mapped_attributes(attributes:) ⇒ Object
252 253 254 |
# File 'lib/wings/converter_value_mapper.rb', line 252 def self.mapped_attributes(attributes:) new(attributes).result end |
Instance Method Details
#result ⇒ Object
256 257 258 259 260 261 262 |
# File 'lib/wings/converter_value_mapper.rb', line 256 def result Hash[ attributes.map do |value| ConverterValueMapper.for(value).result end.select(&:present?) ] end |