Class: Eddy::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/eddy/cli.rb

Overview

Command Line Interface for Eddy

Instance Method Summary collapse

Instance Method Details

#segment(path) ⇒ void

This method returns an undefined value.

Parameters:

  • path (String)


19
20
21
22
23
24
25
# File 'lib/eddy/cli.rb', line 19

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

#set(path) ⇒ void

This method returns an undefined value.

Parameters:

  • path (String)


30
31
32
33
34
35
36
# File 'lib/eddy/cli.rb', line 30

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

#versionvoid

This method returns an undefined value.



10
11
12
13
# File 'lib/eddy/cli.rb', line 10

def version()
  puts("Eddy version #{Eddy::VERSION}")
  exit(0)
end