Class: Utilities::SpecObject

Inherits:
Object
  • Object
show all
Defined in:
lib/retrospec/spec_object.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mod_instance) ⇒ SpecObject

Returns a new instance of SpecObject.



7
8
9
# File 'lib/retrospec/spec_object.rb', line 7

def initialize(mod_instance)
  @instance = mod_instance
end

Instance Attribute Details

#enable_beaker_testsObject

Returns the value of attribute enable_beaker_tests.



5
6
7
# File 'lib/retrospec/spec_object.rb', line 5

def enable_beaker_tests
  @enable_beaker_tests
end

#instanceObject (readonly)

Returns the value of attribute instance.



4
5
6
# File 'lib/retrospec/spec_object.rb', line 4

def instance
  @instance
end

#parametersObject

Returns the value of attribute parameters.



5
6
7
# File 'lib/retrospec/spec_object.rb', line 5

def parameters
  @parameters
end

#resourcesObject

Returns the value of attribute resources.



5
6
7
# File 'lib/retrospec/spec_object.rb', line 5

def resources
  @resources
end

#typeObject

Returns the value of attribute type.



5
6
7
# File 'lib/retrospec/spec_object.rb', line 5

def type
  @type
end

#typesObject

Returns the value of attribute types.



5
6
7
# File 'lib/retrospec/spec_object.rb', line 5

def types
  @types
end

Instance Method Details

#enable_beaker_tests?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/retrospec/spec_object.rb', line 27

def enable_beaker_tests?
  @enable_beaker_tests == true
end

#get_bindingObject



23
24
25
# File 'lib/retrospec/spec_object.rb', line 23

def get_binding
  binding
end

#module_nameObject



15
16
17
# File 'lib/retrospec/spec_object.rb', line 15

def module_name
  instance.module_name
end

#module_pathObject



19
20
21
# File 'lib/retrospec/spec_object.rb', line 19

def module_path
  instance.module_path
end

#variable_value(key) ⇒ Object

allows the user to use the variable store to resolve the variable if it exists



32
33
34
# File 'lib/retrospec/spec_object.rb', line 32

def variable_value(key)
  VariableStore.resolve(key)
end