Class: Opencdd::EffectiveProperties::Result
- Inherits:
-
Struct
- Object
- Struct
- Opencdd::EffectiveProperties::Result
- Includes:
- Enumerable
- Defined in:
- lib/opencdd/effective_properties.rb
Instance Attribute Summary collapse
-
#properties ⇒ Object
Returns the value of attribute properties.
-
#sources ⇒ Object
Returns the value of attribute sources.
Instance Method Summary collapse
- #codes ⇒ Object
- #each ⇒ Object
- #each_property ⇒ Object
- #include?(property) ⇒ Boolean
- #size ⇒ Object
- #to_a ⇒ Object
Instance Attribute Details
#properties ⇒ Object
Returns the value of attribute properties
7 8 9 |
# File 'lib/opencdd/effective_properties.rb', line 7 def properties @properties end |
#sources ⇒ Object
Returns the value of attribute sources
7 8 9 |
# File 'lib/opencdd/effective_properties.rb', line 7 def sources @sources end |
Instance Method Details
#codes ⇒ Object
29 30 31 |
# File 'lib/opencdd/effective_properties.rb', line 29 def codes properties.map(&:code) end |
#each ⇒ Object
10 11 12 13 |
# File 'lib/opencdd/effective_properties.rb', line 10 def each return enum_for(:each) unless block_given? properties.each { |p| yield p } end |
#each_property ⇒ Object
15 16 17 18 |
# File 'lib/opencdd/effective_properties.rb', line 15 def each_property return enum_for(:each_property) unless block_given? properties.each { |p| yield p } end |
#include?(property) ⇒ Boolean
24 25 26 27 |
# File 'lib/opencdd/effective_properties.rb', line 24 def include?(property) irdi = property.is_a?(Opencdd::IRDI) ? property : property&.irdi properties.any? { |p| p.irdi == irdi } end |
#size ⇒ Object
20 21 22 |
# File 'lib/opencdd/effective_properties.rb', line 20 def size properties.size end |
#to_a ⇒ Object
33 34 35 |
# File 'lib/opencdd/effective_properties.rb', line 33 def to_a properties.dup end |