Sha256: bbaabee541225a7a1d4de1b8518a1627a337a8f37763f105837a9dc9ce980b14

Contents?: true

Size: 880 Bytes

Versions: 18

Compression:

Stored size: 880 Bytes

Contents

require 'parslet'
require 'junoser/display'
require 'junoser/input'
require 'junoser/parser'


module Junoser
  module Cli
    class << self
      def commit_check(io_or_string)
        config = Junoser::Input.new(io_or_string).read

        if Junoser::Display.display_set?(config)
          commit_check_display_set config
        else
          commit_check_structured config
        end
      end

      def display_set(io_or_string)
        Junoser::Display::Set.new(io_or_string).transform
      end

      def struct(io_or_string)
        Junoser::Display::Structure.new(io_or_string).transform
      end


      private

      def commit_check_structured(config)
        Junoser::Display::Set.new(config).commit_check
      end

      def commit_check_display_set(config)
        parser = Junoser::Parser.new
        parser.parse_lines(config)
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
junoser-0.3.8 lib/junoser/cli.rb
junoser-0.3.7 lib/junoser/cli.rb
junoser-0.3.6 lib/junoser/cli.rb
junoser-0.3.5 lib/junoser/cli.rb
junoser-0.3.4 lib/junoser/cli.rb
junoser-0.3.3 lib/junoser/cli.rb
junoser-0.3.2 lib/junoser/cli.rb
junoser-0.3.1 lib/junoser/cli.rb
junoser-0.3.0 lib/junoser/cli.rb
junoser-0.2.13 lib/junoser/cli.rb
junoser-0.2.12 lib/junoser/cli.rb
junoser-0.2.11 lib/junoser/cli.rb
junoser-0.2.10 lib/junoser/cli.rb
junoser-0.2.9 lib/junoser/cli.rb
junoser-0.2.8 lib/junoser/cli.rb
junoser-0.2.7 lib/junoser/cli.rb
junoser-0.2.6 lib/junoser/cli.rb
junoser-0.2.5 lib/junoser/cli.rb