Class: Webcomics2::Dir
- Inherits:
-
Object
- Object
- Webcomics2::Dir
- Defined in:
- lib/wc2_dir.rb
Class Method Summary collapse
-
.alpha_chapters(series_path) ⇒ Array
Returns an array of all the directories within this series path that only consist of letters.
-
.chapter?(series_path) ⇒ Boolean
Returns true if the series path is considered a chapter/directory.
-
.comics_entries(series_path) ⇒ Array
Returns entries from the series path without the previous or current directories.
-
.no_ext(pages) ⇒ Array
Returns an array of pages without file extentions.
-
.numeric_chapters(series_path) ⇒ Array
Returns an array of all the numeric directories within this series path.
-
.page?(series_path) ⇒ Boolean
Returns true if the series path is considered a page/file.
-
.pages(series_path) ⇒ Array
Returns an array of what is considered comic book pages/files.
-
.series_have_chapters?(series_path) ⇒ Boolean
Returns true if the comic book series has chapters.
Instance Method Summary collapse
-
#alpha_chapters ⇒ Array
Returns an array of all the directories within this series path that only consist of letters.
-
#chapter? ⇒ Boolean
Returns true if the series path is considered a chapter/directory.
-
#initialize(series_path) ⇒ Dir
constructor
A new instance of Dir.
-
#numeric_chapters ⇒ Array
Returns an array of all the numeric directories within this series path.
-
#page? ⇒ Boolean
Returns true if the series path is considered a page/file.
-
#pages ⇒ Array
Returns an array of what is considered comic book pages/files.
-
#series_have_chapters? ⇒ Boolean
Returns true if the comic book series has chapters.
-
#series_path ⇒ String
(also: #path)
Returns the path.
Constructor Details
#initialize(series_path) ⇒ Dir
Returns a new instance of Dir.
65 66 67 |
# File 'lib/wc2_dir.rb', line 65 def initialize(series_path) @series_path = series_path end |
Class Method Details
.alpha_chapters(series_path) ⇒ Array
Returns an array of all the directories within this series path that only consist of letters.
48 49 50 |
# File 'lib/wc2_dir.rb', line 48 def self.alpha_chapters(series_path) return_an_array_of_alpha_chapters(series_path) end |
.chapter?(series_path) ⇒ Boolean
Returns true if the series path is considered a chapter/directory.
25 26 27 |
# File 'lib/wc2_dir.rb', line 25 def self.chapter?(series_path) is_this_series_path_a_chapter?(series_path) end |
.comics_entries(series_path) ⇒ Array
Returns entries from the series path without the previous or current directories.
10 11 12 |
# File 'lib/wc2_dir.rb', line 10 def self.comics_entries(series_path) return_an_array_of_comics_entries(series_path) end |
.no_ext(pages) ⇒ Array
Returns an array of pages without file extentions.
18 19 20 |
# File 'lib/wc2_dir.rb', line 18 def self.no_ext(pages) return_comics_entries_without_file_extentions(pages) end |
.numeric_chapters(series_path) ⇒ Array
Returns an array of all the numeric directories within this series path.
56 57 58 |
# File 'lib/wc2_dir.rb', line 56 def self.numeric_chapters(series_path) return_an_array_of_numeric_chapters(series_path) end |
.page?(series_path) ⇒ Boolean
Returns true if the series path is considered a page/file.
32 33 34 |
# File 'lib/wc2_dir.rb', line 32 def self.page?(series_path) is_this_series_path_a_page?(series_path) end |
.pages(series_path) ⇒ Array
Returns an array of what is considered comic book pages/files.
40 41 42 |
# File 'lib/wc2_dir.rb', line 40 def self.pages(series_path) return_an_array_of_comics_pages(series_path) end |
.series_have_chapters?(series_path) ⇒ Boolean
Returns true if the comic book series has chapters.
61 62 63 |
# File 'lib/wc2_dir.rb', line 61 def self.series_have_chapters?(series_path) does_this_series_have_chapters?(series_path) end |
Instance Method Details
#alpha_chapters ⇒ Array
Returns an array of all the directories within this series path that only consist of letters.
96 97 98 |
# File 'lib/wc2_dir.rb', line 96 def alpha_chapters Dir.alpha_chapters(@series_path) end |
#chapter? ⇒ Boolean
Returns true if the series path is considered a chapter/directory.
77 78 79 |
# File 'lib/wc2_dir.rb', line 77 def chapter? Dir.chapter?(@series_path) end |
#numeric_chapters ⇒ Array
Returns an array of all the numeric directories within this series path.
103 104 105 |
# File 'lib/wc2_dir.rb', line 103 def numeric_chapters Dir.numeric_chapters(@series_path) end |
#page? ⇒ Boolean
Returns true if the series path is considered a page/file.
82 83 84 |
# File 'lib/wc2_dir.rb', line 82 def page? Dir.page?(@series_path) end |
#pages ⇒ Array
Returns an array of what is considered comic book pages/files.
89 90 91 |
# File 'lib/wc2_dir.rb', line 89 def pages Dir.pages(@series_path) end |
#series_have_chapters? ⇒ Boolean
Returns true if the comic book series has chapters.
108 109 110 |
# File 'lib/wc2_dir.rb', line 108 def series_have_chapters? Dir.series_have_chapters?(@series_path) end |
#series_path ⇒ String Also known as: path
Returns the path.
72 73 74 |
# File 'lib/wc2_dir.rb', line 72 def series_path @series_path end |