Class: Pickles::Config
- Inherits:
-
Object
- Object
- Pickles::Config
- Defined in:
- lib/cucumber/pickles/config.rb
Instance Attribute Summary collapse
-
#css_node_map ⇒ Object
Returns the value of attribute css_node_map.
-
#log_xhr_response ⇒ Object
Returns the value of attribute log_xhr_response.
-
#xpath_node_map ⇒ Object
Returns the value of attribute xpath_node_map.
Instance Method Summary collapse
- #check_step_by_tag(tag) ⇒ Object
- #check_tag_steps_map=(map) ⇒ Object
- #fill_tag_steps_map=(map) ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #step_by_tag(tag) ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/cucumber/pickles/config.rb', line 21 def initialize @css_node_map = {} @log_xhr_response = false @xpath_node_map = {} @fill_tag_steps_map = { 'select' => FillIN::Select, 'jselect' => FillIN::JsSelect } @check_tag_steps_map = { 'text' => CheckIn::Text, 'select' => CheckIn::Select, 'image' => CheckIn::Image, 'video' => CheckIn::Video } end |
Instance Attribute Details
#css_node_map ⇒ Object
Returns the value of attribute css_node_map.
19 20 21 |
# File 'lib/cucumber/pickles/config.rb', line 19 def css_node_map @css_node_map end |
#log_xhr_response ⇒ Object
Returns the value of attribute log_xhr_response.
19 20 21 |
# File 'lib/cucumber/pickles/config.rb', line 19 def log_xhr_response @log_xhr_response end |
#xpath_node_map ⇒ Object
Returns the value of attribute xpath_node_map.
19 20 21 |
# File 'lib/cucumber/pickles/config.rb', line 19 def xpath_node_map @xpath_node_map end |
Instance Method Details
#check_step_by_tag(tag) ⇒ Object
61 62 63 |
# File 'lib/cucumber/pickles/config.rb', line 61 def check_step_by_tag(tag) @check_tag_steps_map[tag] end |
#check_tag_steps_map=(map) ⇒ Object
51 52 53 54 55 |
# File 'lib/cucumber/pickles/config.rb', line 51 def check_tag_steps_map=(map) raise(ArgumentError, "Node map must be a hash") unless map.is_a?(Hash) @check_tag_steps_map.merge!(map.stringify_keys) end |
#fill_tag_steps_map=(map) ⇒ Object
45 46 47 48 49 |
# File 'lib/cucumber/pickles/config.rb', line 45 def fill_tag_steps_map=(map) raise(ArgumentError, "Node map must be a hash") unless map.is_a?(Hash) @fill_tag_steps_map.merge!(map.stringify_keys) end |
#step_by_tag(tag) ⇒ Object
57 58 59 |
# File 'lib/cucumber/pickles/config.rb', line 57 def step_by_tag(tag) @fill_tag_steps_map[tag] end |