Class: Torba::ImportList::Asset

Inherits:
Struct
  • Object
show all
Defined in:
lib/torba/import_list.rb

Overview

Since:

  • 0.1.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#absolute_pathObject

Returns the value of attribute absolute_path

Returns:

  • (Object)

    the current value of absolute_path



8
9
10
# File 'lib/torba/import_list.rb', line 8

def absolute_path
  @absolute_path
end

#logical_pathObject

Returns the value of attribute logical_path

Returns:

  • (Object)

    the current value of logical_path



8
9
10
# File 'lib/torba/import_list.rb', line 8

def logical_path
  @logical_path
end

Instance Method Details

#css?Boolean

Returns:

  • (Boolean)

Since:

  • 0.1.0



9
10
11
# File 'lib/torba/import_list.rb', line 9

def css?
  absolute_path =~ /\.(sass|scss|css)$/
end

#js?Boolean

Returns:

  • (Boolean)

Since:

  • 0.1.0



13
14
15
# File 'lib/torba/import_list.rb', line 13

def js?
  absolute_path.end_with?(".js")
end