Class: JsDependency::Mermaid::TargetPathname
- Inherits:
-
Object
- Object
- JsDependency::Mermaid::TargetPathname
- Defined in:
- lib/js_dependency/mermaid/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
-
#initialize(target_path) ⇒ TargetPathname
constructor
A new instance of TargetPathname.
- #mermaid_style(src_path) ⇒ String
Constructor Details
#initialize(target_path) ⇒ TargetPathname
Returns a new instance of TargetPathname.
10 11 12 13 14 |
# File 'lib/js_dependency/mermaid/target_pathname.rb', line 10 def initialize(target_path) @pathname = to_target_pathname(target_path) @color_css = "#f9f" @font_size_css = "4px" end |
Instance Attribute Details
#color_css ⇒ Object
Returns the value of attribute color_css.
7 8 9 |
# File 'lib/js_dependency/mermaid/target_pathname.rb', line 7 def color_css @color_css end |
#font_size_css ⇒ Object
Returns the value of attribute font_size_css.
7 8 9 |
# File 'lib/js_dependency/mermaid/target_pathname.rb', line 7 def font_size_css @font_size_css end |
Instance Method Details
#mermaid_style(src_path) ⇒ String
18 19 20 21 |
# File 'lib/js_dependency/mermaid/target_pathname.rb', line 18 def mermaid_style(src_path) src_pathname = Pathname.new(src_path).realpath export_style(parse(@pathname.exist? ? @pathname.relative_path_from(src_pathname) : @pathname).join("_")) end |