aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stif/codif_line_id.rb
blob: b7f3c8bd5282474ba29adb1bc2bc500bd3e3c2e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module STIF
  module CodifLineId extend self

    LINE_OBJECT_ID_SEPERATOR = ':'

    def extract_codif_line_id line_name
      line_name.split(LINE_OBJECT_ID_SEPERATOR).last
    end

    def lines_set_from_functional_scope(functional_scope)
      Set.new(
        functional_scope
          .map{ |line| extract_codif_line_id line })
    end
  end
end