Class: Yeah::Asset Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/yeah/_platform/asset.rb

Overview

This class is abstract.

Subclassed to more specific assets.

Note:

Provided by a Platform

An Asset represents a file found in a project's assets/ directory.

Direct Known Subclasses

Font, Image, Sound

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Asset

Returns a new instance of Asset

Parameters:

  • path (String)

    relative to assets/

Raises:

  • (NotImplementedError)

8
9
10
# File 'lib/yeah/_platform/asset.rb', line 8

def initialize(path)
  raise NotImplementedError
end

Instance Attribute Details

#pathString (readonly)

Returns path to asset relative to assets/

Returns:

  • (String)

    path to asset relative to assets/


# File 'lib/yeah/_platform/asset.rb', line 19

Class Method Details

.[](*args) ⇒ Asset

Alias for ::new.

Parameters:

  • arguments

    catch-all

Returns:


# File 'lib/yeah/_platform/asset.rb', line 17