class Onoma::Migration::Actions::NomenclatureCreation
Attributes
name[R]
nomenclature[R]
options[R]
Public Class Methods
new(element)
click to toggle source
# File lib/onoma/migration/actions/nomenclature_creation.rb, line 7 def initialize(element) @nomenclature = if element.key?('nomenclature') element['nomenclature'].to_s elsif element.key?('name') element['name'].to_s else nil end 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
Public Instance Methods
human_name()
click to toggle source
# File lib/onoma/migration/actions/nomenclature_creation.rb, line 25 def human_name "Create nomenclature #{@name}" end