Class: Orchparty::AST

Inherits:
Object
  • Object
show all
Defined in:
lib/orchparty/ast.rb

Defined Under Namespace

Classes: Node

Class Method Summary collapse

Class Method Details

.all(args = {}) ⇒ Object



32
33
34
# File 'lib/orchparty/ast.rb', line 32

def self.all(args = {})
  Node.new(_mix:[], _variables: {}).merge(args)
end

.application(args = {}) ⇒ Object



28
29
30
# File 'lib/orchparty/ast.rb', line 28

def self.application(args = {})
  Node.new({services: {}, _mixins: {}, _mix:[], volumes: {}, _variables: {}, networks: {}}).merge(args)
end

.application_mixin(args = {}) ⇒ Object



36
37
38
# File 'lib/orchparty/ast.rb', line 36

def self.application_mixin(args = {})
  Node.new(_mix:[], _variables: {}).merge(args)
end

.array(args = []) ⇒ Object



16
17
18
# File 'lib/orchparty/ast.rb', line 16

def self.array(args = [])
  args
end

.hash(args = {}) ⇒ Object



12
13
14
# File 'lib/orchparty/ast.rb', line 12

def self.hash(args = {})
  Node.new.merge(args)
end

.mixin(args = {}) ⇒ Object



24
25
26
# File 'lib/orchparty/ast.rb', line 24

def self.mixin(args = {})
  Node.new({services: {}, _mixins: {}, volumes: {}, _variables: {}, networks: {}}).merge(args)
end

.root(args = {}) ⇒ Object



20
21
22
# File 'lib/orchparty/ast.rb', line 20

def self.root(args = {})
  Node.new(applications: {}, _mixins: {}).merge(args)
end

.service(args = {}) ⇒ Object



40
41
42
# File 'lib/orchparty/ast.rb', line 40

def self.service(args = {})
  Node.new(_mix:[], _variables: {}).merge(args)
end