Sha256: 970925b6df70ec643745a5a8ffc95b8245dd76c88e117b3ae5a7346296219b54

Contents?: true

Size: 624 Bytes

Versions: 47

Compression:

Stored size: 624 Bytes

Contents

# frozen_string_literal: true

require "parslet"

module Lutaml
  module Uml
    module Parsers
      # Class for additional transformations of LutaML syntax:
      # visibility modifier etc
      class DslTransform < Parslet::Transform
        rule(visibility_modifier: simple(:visibility_value)) do
          case visibility_value
          when "-"
            "private"
          when "#"
            "protected"
          when "~"
            "friendly"
          else
            "public"
          end
        end
        rule(simple(:member)) { member.nil? ? member : member.to_s.strip }
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 2 rubygems

Version Path
lutaml-0.9.26 lib/lutaml/uml/parsers/dsl_transform.rb
lutaml-0.9.25 lib/lutaml/uml/parsers/dsl_transform.rb
lutaml-0.9.24 lib/lutaml/uml/parsers/dsl_transform.rb
lutaml-0.9.23 lib/lutaml/uml/parsers/dsl_transform.rb
lutaml-0.9.22 lib/lutaml/uml/parsers/dsl_transform.rb
lutaml-0.9.21 lib/lutaml/uml/parsers/dsl_transform.rb
lutaml-0.9.20 lib/lutaml/uml/parsers/dsl_transform.rb
lutaml-0.9.19 lib/lutaml/uml/parsers/dsl_transform.rb
lutaml-0.9.18 lib/lutaml/uml/parsers/dsl_transform.rb
lutaml-0.9.17 lib/lutaml/uml/parsers/dsl_transform.rb
lutaml-0.9.16 lib/lutaml/uml/parsers/dsl_transform.rb
lutaml-0.9.15 lib/lutaml/uml/parsers/dsl_transform.rb
lutaml-0.9.14 lib/lutaml/uml/parsers/dsl_transform.rb
lutaml-0.9.13 lib/lutaml/uml/parsers/dsl_transform.rb
lutaml-0.9.12 lib/lutaml/uml/parsers/dsl_transform.rb
lutaml-0.9.11 lib/lutaml/uml/parsers/dsl_transform.rb
lutaml-0.9.10 lib/lutaml/uml/parsers/dsl_transform.rb
lutaml-0.9.9 lib/lutaml/uml/parsers/dsl_transform.rb
lutaml-0.9.8 lib/lutaml/uml/parsers/dsl_transform.rb
lutaml-0.9.7 lib/lutaml/uml/parsers/dsl_transform.rb