Module: Messenger::Components::Element

Instance Method Summary collapse

Instance Method Details

#buildObject



4
5
6
# File 'lib/messenger/components/element.rb', line 4

def build
  instance_values.delete_if { |_attribute, value| value.nil? }
end

#build_elements(elements) ⇒ Object



8
9
10
# File 'lib/messenger/components/element.rb', line 8

def build_elements(elements)
  elements.map { |element| element.build } if elements.present?
end