Class: Terraspace::Tester::Meta

Inherits:
Object
  • Object
show all
Defined in:
lib/terraspace/tester/meta.rb

Instance Method Summary collapse

Constructor Details

#initialize(raw) ⇒ Meta

raw: => {root: “/path”



4
5
6
# File 'lib/terraspace/tester/meta.rb', line 4

def initialize(raw)
  @raw = raw
end

Instance Method Details

#dataObject



17
18
19
# File 'lib/terraspace/tester/meta.rb', line 17

def data
  @raw.values.first
end

#nameObject Also known as: tester



8
9
10
11
12
13
14
# File 'lib/terraspace/tester/meta.rb', line 8

def name
  name = @raw.keys.first
  unless name
    raise "No tester gem found. Are you sure you have the terraspace test gem configured in your Gemfile?"
  end
  name.camelize
end

#rootObject



21
22
23
# File 'lib/terraspace/tester/meta.rb', line 21

def root
  data[:root]
end