Module: Yari
- Extended by:
- Yari
- Included in:
- Yari
- Defined in:
- lib/yari.rb,
lib/yari/builder.rb,
lib/yari/version.rb,
lib/yari/yari_dsl.rb,
lib/yari/yari_loader.rb
Defined Under Namespace
Modules: DSL, RSpec
Classes: Ambiguous, Builder, Example, Feature, Malformed, Pending, Scenario
Constant Summary
collapse
- VERSION =
"0.0.2"
Class Attribute Summary collapse
Instance Method Summary
collapse
Class Attribute Details
.features ⇒ Object
Returns the value of attribute features.
11
12
13
|
# File 'lib/yari.rb', line 11
def features
@features
end
|
Instance Method Details
#feature?(path) ⇒ Boolean
21
22
23
|
# File 'lib/yari.rb', line 21
def feature?(path)
!!path.match(mask_to_pattern(feature_mask))
end
|
#feature_spec?(path) ⇒ Boolean
25
26
27
|
# File 'lib/yari.rb', line 25
def feature_spec?(path)
!!path.match(mask_to_pattern(spec_mask))
end
|
#feature_to_spec(path, prefix = true) ⇒ Object
29
30
31
32
|
# File 'lib/yari.rb', line 29
def feature_to_spec(path, prefix = true)
path = path.match(mask_to_pattern(feature_mask))[0] unless prefix
path.sub(mask_to_pattern(feature_mask), mask_to_replacement(spec_mask))
end
|
#spec_to_feature(path, prefix = true) ⇒ Object
34
35
36
37
|
# File 'lib/yari.rb', line 34
def spec_to_feature(path, prefix = true)
path = path.match(mask_to_pattern(spec_mask))[0] unless prefix
path.sub(mask_to_pattern(spec_mask), mask_to_replacement(feature_mask))
end
|