Sha256: c044be289da895056e4dd0e1ffcb401b3787e73b3f4e6244b3237e1d701fbb35
Contents?: true
Size: 778 Bytes
Versions: 8
Compression:
Stored size: 778 Bytes
Contents
module Onoma class Migration module Actions class NomenclatureCreation < Onoma::Migration::Actions::Base attr_reader :nomenclature, :options def initialize(element) @nomenclature = element.key?('nomenclature') ? element['nomenclature'].to_s : element.key?('name') ? element['name'].to_s : nil raise 'No given name' unless @nomenclature @options = {} notions = element.attr('notions').to_s.split(/\s*\,\s*/).map(&:to_sym) @options[:notions] = notions if notions.any? @options[:translateable] = element.attr('translateable').to_s != 'false' end alias name nomenclature def human_name "Create nomenclature #{@name}" end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems