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
42
43
44
45
# File 'lib/epm.rb', line 37

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

#query(args) ⇒ Object



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

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

#restartObject



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

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

#setupObject



78
79
80
# File 'lib/epm.rb', line 78

def setup
  return EPM::Settings.check
end

#startObject



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

def start
  EPM::Server.start
end

#stopObject



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

def stop
  EPM::Server.stop
end

#transact(args) ⇒ Object



47
48
49
50
51
52
# File 'lib/epm.rb', line 47

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

#versionObject



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

def version
  return VERSION
end