Class: StoryboardLint::StoryboardScanner
- Inherits:
-
Object
- Object
- StoryboardLint::StoryboardScanner
- Defined in:
- lib/storyboardlint.rb
Instance Method Summary collapse
- #custom_class_names ⇒ Object
-
#initialize(src_root) ⇒ StoryboardScanner
constructor
A new instance of StoryboardScanner.
- #reuse_ids ⇒ Object
- #segue_ids ⇒ Object
- #storyboard_files ⇒ Object
- #storyboard_ids ⇒ Object
- #xib_files ⇒ Object
Constructor Details
#initialize(src_root) ⇒ StoryboardScanner
Returns a new instance of StoryboardScanner.
11 12 13 14 15 16 17 18 |
# File 'lib/storyboardlint.rb', line 11 def initialize(src_root) if !File.directory?(src_root) raise ArgumentError, "The directory '#{src_root}' does not exist." end @src_root = src_root @scan_performed = false end |
Instance Method Details
#custom_class_names ⇒ Object
49 50 51 52 |
# File 'lib/storyboardlint.rb', line 49 def custom_class_names scan_files @custom_class_names end |
#reuse_ids ⇒ Object
44 45 46 47 |
# File 'lib/storyboardlint.rb', line 44 def reuse_ids scan_files @reuse_ids end |
#segue_ids ⇒ Object
34 35 36 37 |
# File 'lib/storyboardlint.rb', line 34 def segue_ids scan_files @segue_ids end |
#storyboard_files ⇒ Object
20 21 22 23 24 25 |
# File 'lib/storyboardlint.rb', line 20 def storyboard_files return @sb_files if @sb_files # find all storyboard files... @sb_files = Dir.glob(File.join(@src_root, "**/*.storyboard")) end |
#storyboard_ids ⇒ Object
39 40 41 42 |
# File 'lib/storyboardlint.rb', line 39 def storyboard_ids scan_files @storyboard_ids end |
#xib_files ⇒ Object
27 28 29 30 31 32 |
# File 'lib/storyboardlint.rb', line 27 def xib_files return @xib_files if @xib_files # find all XIB files... @xib_files = Dir.glob(File.join(@src_root, "**/*.xib")) end |