Class: Clouddns::DSL

Inherits:
Object
  • Object
show all
Defined in:
lib/clouddns/dsl.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDSL

Returns a new instance of DSL.



6
7
8
9
10
11
# File 'lib/clouddns/dsl.rb', line 6

def initialize
  @zones = []
  @zone = nil
  @defaults = {}
  @fog_options = {}
end

Instance Attribute Details

#fog_optionsObject (readonly)

Returns the value of attribute fog_options.



4
5
6
# File 'lib/clouddns/dsl.rb', line 4

def fog_options
  @fog_options
end

#zonesObject (readonly)

Returns the value of attribute zones.



3
4
5
# File 'lib/clouddns/dsl.rb', line 3

def zones
  @zones
end

Class Method Details

.parse_file(filename) ⇒ Object



18
19
20
# File 'lib/clouddns/dsl.rb', line 18

def self.parse_file filename
  parse_string open(filename).read
end

.parse_string(string) ⇒ Object



13
14
15
16
17
# File 'lib/clouddns/dsl.rb', line 13

def self.parse_string string
  dsl = DSL.new
  dsl.instance_eval string
  dsl
end