Class: Stringup::FileAssertion
- Defined in:
- lib/stringup/assertions/file_assertion.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(path, options = {}) ⇒ FileAssertion
constructor
A new instance of FileAssertion.
- #kind ⇒ Object
- #kind_name ⇒ Object
Methods inherited from Assertion
[], assertion, #describe_should_at, each, registry
Constructor Details
#initialize(path, options = {}) ⇒ FileAssertion
Returns a new instance of FileAssertion.
4 5 6 7 |
# File 'lib/stringup/assertions/file_assertion.rb', line 4 def initialize(path, = {}) @path = path @options = end |
Instance Method Details
#kind ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/stringup/assertions/file_assertion.rb', line 9 def kind if @options[:directory] :directory elsif @options[:file] :file end end |
#kind_name ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/stringup/assertions/file_assertion.rb', line 17 def kind_name case kind when :file 'a regular file' when :directory 'a directory' else 'a file' end end |