Sha256: a547d61677c5bff3603d146bf0a239b8a77a9f8abd71bac70644de0ae58e4973
Contents?: true
Size: 1.06 KB
Versions: 15
Compression:
Stored size: 1.06 KB
Contents
require "thor" module Eddy # Command Line Interface for Eddy class CLI < Thor desc "version", "Display version" map ["-v", "--version"] => :version # @return [void] def version() puts("Eddy version #{Eddy::VERSION}") exit(0) end desc("segment PATH", "Build a Segment from a JSON or YAML definition") method_option("build-elements", type: :boolean, default: false) # @param path [String] # @return [void] def segment(path) path = File.expand_path(path) builder = Eddy::Build::SegmentBuilder.from_file(path) result = builder.build(build_elements: options["build-elements"]) puts("Segment class generated: #{result}") exit(0) end desc("set PATH", "Build a Transaction Set from a JSON or YAML definition") # @param path [String] # @return [void] def set(path) path = File.expand_path(path) builder = Eddy::Build::TransactionSetBuilder.from_file(path) result = builder.build() puts("Transaction Set class generated: #{result}") exit(0) end end end
Version data entries
15 entries across 15 versions & 1 rubygems