Class: JsDependency::TargetPathname
- Inherits:
-
Object
- Object
- JsDependency::TargetPathname
- Defined in:
- lib/js_dependency/target_pathname.rb
Instance Attribute Summary collapse
-
#color_css ⇒ Object
Returns the value of attribute color_css.
-
#font_size_css ⇒ Object
Returns the value of attribute font_size_css.
Instance Method Summary collapse
- #each_child_path(analyze_level, index) ⇒ Object
- #each_parent_path(analyze_level, index) ⇒ Object
-
#initialize(target_path) ⇒ TargetPathname
constructor
A new instance of TargetPathname.
Constructor Details
#initialize(target_path) ⇒ TargetPathname
Returns a new instance of TargetPathname.
9 10 11 |
# File 'lib/js_dependency/target_pathname.rb', line 9 def initialize(target_path) @pathname = to_target_pathname(target_path) end |
Instance Attribute Details
#color_css ⇒ Object
Returns the value of attribute color_css.
6 7 8 |
# File 'lib/js_dependency/target_pathname.rb', line 6 def color_css @color_css end |
#font_size_css ⇒ Object
Returns the value of attribute font_size_css.
6 7 8 |
# File 'lib/js_dependency/target_pathname.rb', line 6 def font_size_css @font_size_css end |
Instance Method Details
#each_child_path(analyze_level, index) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/js_dependency/target_pathname.rb', line 32 def each_child_path(analyze_level, index) temp_paths = [@pathname.to_s] analyze_level.times do list = [] temp_paths.each do |temp_path| temp_pathname = to_target_pathname(temp_path) list += extract_children_paths(temp_pathname.to_s, index).each do |child_path| yield temp_pathname.to_s, child_path end end temp_paths = list end end |
#each_parent_path(analyze_level, index) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/js_dependency/target_pathname.rb', line 15 def each_parent_path(analyze_level, index) temp_paths = [@pathname.to_s] analyze_level.times do list = [] temp_paths.each do |temp_path| temp_pathname = to_target_pathname(temp_path) list += extract_parent_paths(temp_pathname.to_s, index).each do |parent_path| yield parent_path, temp_pathname.to_s end end temp_paths = list end end |