Class: LensProtocol::OMA::Record

Inherits:
Object
  • Object
show all
Defined in:
lib/lens_protocol/oma/record.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#labelObject (readonly)

Returns the value of attribute label.



4
5
6
# File 'lib/lens_protocol/oma/record.rb', line 4

def label
  @label
end

#valueObject (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

Returns:

  • (Boolean)


13
14
15
# File 'lib/lens_protocol/oma/record.rb', line 13

def empty?
  Array(value).select(&:present?).empty?
end