class Onoma::Relation

Attributes

nomenclature[R]

Public Class Methods

new(nomenclature, *args) click to toggle source
Calls superclass method
# File lib/onoma/relation.rb, line 7
def initialize(nomenclature, *args)
  super(*args)
  @nomenclature = nomenclature
end

Public Instance Methods

selection(sorted = true) click to toggle source
# File lib/onoma/relation.rb, line 18
def selection(sorted = true)
  unit_selec = collect do |item|
    [item.human_name, item.name.to_s]
  end
  if sorted
    unit_selec.sort! do |a, b|
      a.first.lower_ascii <=> b.first.lower_ascii
    end
  end

  unit_selec
end