Module: InvisionSupport::Path

Includes:
NodeName
Defined in:
lib/invision_support/path.rb

Constant Summary

Constants included from NodeName

NodeName::ASSET_EXTS, NodeName::EXCLUDE, NodeName::GLOBAL, NodeName::SCREEN, NodeName::VARIANT

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from NodeName

#asset?, #exclude?, #global?, #icon?, #screen?, #variant?

Methods included from Filename

#filename_in_png, #preview_filename

Instance Attribute Details

#fonts_pathObject

Example:

root_path:    /var/www/output/mail-app
fonts_path:   /var/www/output/mail-app/assets/fonts
images_path:  /var/www/output/mail-app/assets/images
screens_path: /var/www/output/mail-app/screens
icons_path:   /var/www/output/mail-app/icons


12
13
14
# File 'lib/invision_support/path.rb', line 12

def fonts_path
  @fonts_path
end

#icons_pathObject

Example:

root_path:    /var/www/output/mail-app
fonts_path:   /var/www/output/mail-app/assets/fonts
images_path:  /var/www/output/mail-app/assets/images
screens_path: /var/www/output/mail-app/screens
icons_path:   /var/www/output/mail-app/icons


12
13
14
# File 'lib/invision_support/path.rb', line 12

def icons_path
  @icons_path
end

#images_pathObject

Example:

root_path:    /var/www/output/mail-app
fonts_path:   /var/www/output/mail-app/assets/fonts
images_path:  /var/www/output/mail-app/assets/images
screens_path: /var/www/output/mail-app/screens
icons_path:   /var/www/output/mail-app/icons


12
13
14
# File 'lib/invision_support/path.rb', line 12

def images_path
  @images_path
end

#output_filenameObject

Example:

root_path:    /var/www/output/mail-app
fonts_path:   /var/www/output/mail-app/assets/fonts
images_path:  /var/www/output/mail-app/assets/images
screens_path: /var/www/output/mail-app/screens
icons_path:   /var/www/output/mail-app/icons


12
13
14
# File 'lib/invision_support/path.rb', line 12

def output_filename
  @output_filename
end

#root_pathObject

Example:

root_path:    /var/www/output/mail-app
fonts_path:   /var/www/output/mail-app/assets/fonts
images_path:  /var/www/output/mail-app/assets/images
screens_path: /var/www/output/mail-app/screens
icons_path:   /var/www/output/mail-app/icons


12
13
14
# File 'lib/invision_support/path.rb', line 12

def root_path
  @root_path
end

#screens_pathObject

Example:

root_path:    /var/www/output/mail-app
fonts_path:   /var/www/output/mail-app/assets/fonts
images_path:  /var/www/output/mail-app/assets/images
screens_path: /var/www/output/mail-app/screens
icons_path:   /var/www/output/mail-app/icons


12
13
14
# File 'lib/invision_support/path.rb', line 12

def screens_path
  @screens_path
end

Instance Method Details

#preview_path(file_path, output_filename = nil) ⇒ Object

Preview image path e.g. /var/www/output/mail-app/screens/mail-app.png

Returns string



18
19
20
21
# File 'lib/invision_support/path.rb', line 18

def preview_path(file_path, output_filename = nil)
  filename = preview_filename(file_path, output_filename)
  File.join(screens_path, filename)
end

#preview_path_in_zip(file_path, output_filename = nil) ⇒ Object

preview image path in zip e.g. screens/mail-app.png

Returns string



26
27
28
29
# File 'lib/invision_support/path.rb', line 26

def preview_path_in_zip(file_path, output_filename = nil)
  filename = preview_filename(file_path, output_filename)
  File.join(screens_path_in_zip, filename)
end