Class: LensProtocol::OMA::Record
- Inherits:
-
Object
- Object
- LensProtocol::OMA::Record
- Defined in:
- lib/lens_protocol/oma/record.rb
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(label:, value:) ⇒ Record
constructor
A new instance of Record.
Constructor Details
#initialize(label:, value:) ⇒ Record
Returns a new instance of Record.
8 9 10 11 |
# File 'lib/lens_protocol/oma/record.rb', line 8 def initialize label:, value: @label = label @value = value end |
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
4 5 6 |
# File 'lib/lens_protocol/oma/record.rb', line 4 def label @label end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
6 7 8 |
# File 'lib/lens_protocol/oma/record.rb', line 6 def value @value end |
Instance Method Details
#empty? ⇒ Boolean
13 14 15 |
# File 'lib/lens_protocol/oma/record.rb', line 13 def empty? Array(value).select(&:present?).empty? end |