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.



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

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.



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

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.



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

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.



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

def self.all_steps
  @@steps_text_map.values
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.



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

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.



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

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)


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

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)


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

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