Class: Gauge::MethodCache Private

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

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Class Method Details

.add_step(parameterized_step_text, &block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



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

def self.add_step(parameterized_step_text, &block)
  @@steps_map[parameterized_step_text] = block
end

.add_step_alias(*step_texts) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



52
53
54
# File 'lib/method_cache.rb', line 52

def self.add_step_alias(*step_texts)
  @@steps_with_aliases.push *step_texts if step_texts.length > 1
end

.add_step_text(parameterized_step_text, step_text) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



44
45
46
# File 'lib/method_cache.rb', line 44

def self.add_step_text(parameterized_step_text, step_text)
  @@steps_text_map[parameterized_step_text] = step_text
end

.all_steps ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



64
65
66
# File 'lib/method_cache.rb', line 64

def self.all_steps
  @@steps_text_map.values
end

.clear_hooks(hook) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



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

def self.clear_hooks(hook)
  self.class_variable_get("@@#{hook}_hooks").clear
end

.get_step(parameterized_step_text) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



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

def self.get_step(parameterized_step_text)
  @@steps_map[parameterized_step_text]
end

.get_step_text(parameterized_step_text) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



48
49
50
# File 'lib/method_cache.rb', line 48

def self.get_step_text(parameterized_step_text)
  @@steps_text_map[parameterized_step_text]
end

.has_alias?(step_text) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


56
57
58
# File 'lib/method_cache.rb', line 56

def self.has_alias?(step_text)
  @@steps_with_aliases.include? step_text
end

.valid_step?(step) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


60
61
62
# File 'lib/method_cache.rb', line 60

def self.valid_step?(step)
  @@steps_map.has_key? step
end