Module: EPM

Extended by:
EPM
Included in:
EPM
Defined in:
lib/epm.rb,
lib/epm/query.rb,
lib/epm/utils.rb,
lib/epm/create.rb,
lib/epm/deploy.rb,
lib/epm/compile.rb,
lib/epm/transact.rb

Defined Under Namespace

Modules: FileHelpers, HexData, Server, Settings Classes: Compile, Create, Deploy, Query, Transact

Instance Method Summary collapse

Instance Method Details

#compile(args) ⇒ Object



17
18
19
20
21
22
23
24
25
# File 'lib/epm.rb', line 17

def compile args
  output = []
  until args.empty?
    file = args.shift
    settings = setup
    output << EPM::Compile.new(file, settings).compile
  end
  output
end

#create(args) ⇒ Object



27
28
29
30
31
32
33
34
35
# File 'lib/epm.rb', line 27

def create args
  output = []
  until args.empty?
    file = args.shift
    settings = setup
    output << EPM::Create.new(file, settings).deploy
  end
  output
end

#deploy(args) ⇒ Object



37
38
39
40
41
# File 'lib/epm.rb', line 37

def deploy args
  file     = args.shift
  settings = setup
  output   = EPM::Deploy.new(file, settings).deploy_package
end

#query(args) ⇒ Object



50
51
52
53
54
55
# File 'lib/epm.rb', line 50

def query args
  address = args.shift
  position = args.shift
  settings = setup
  EPM::Query.new(address, position, settings).query
end

#restartObject



69
70
71
72
# File 'lib/epm.rb', line 69

def restart
  EPM::Server.stop
  EPM::Server.start
end

#setupObject



74
75
76
# File 'lib/epm.rb', line 74

def setup
  return EPM::Settings.check
end

#startObject



61
62
63
# File 'lib/epm.rb', line 61

def start
  EPM::Server.start
end

#stopObject



65
66
67
# File 'lib/epm.rb', line 65

def stop
  EPM::Server.stop
end

#transact(args) ⇒ Object



43
44
45
46
47
48
# File 'lib/epm.rb', line 43

def transact args
  recipient = args.shift
  data = args
  settings = setup
  EPM::Transact.new(recipient, data, settings).transact
end

#versionObject



57
58
59
# File 'lib/epm.rb', line 57

def version
  return VERSION
end