class Yaks::Mapper::Form::Legend
Public Class Methods
create(label, opts = {})
click to toggle source
# File lib/yaks/mapper/form/legend.rb, line 7 def self.create(label, opts = {}) new(opts.merge(type: :legend, label: label)) end
Public Instance Methods
to_resource_fields(mapper)
click to toggle source
# File lib/yaks/mapper/form/legend.rb, line 11 def to_resource_fields(mapper) return [] unless self.if.nil? || mapper.expand_value(self.if) [ Resource::Form::Legend.new(label: mapper.expand_value(label)) ] end