Class: Markedly::Asset
- Inherits:
-
Object
- Object
- Markedly::Asset
- Defined in:
- lib/markedly/asset.rb
Direct Known Subclasses
Constant Summary collapse
- ASSETS_DIR =
File.('../../../assets', __FILE__)
Instance Attribute Summary collapse
-
#href ⇒ Object
readonly
Returns the value of attribute href.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path) ⇒ Asset
constructor
A new instance of Asset.
- #remote? ⇒ Boolean
Constructor Details
#initialize(path) ⇒ Asset
Returns a new instance of Asset.
13 14 15 16 17 18 |
# File 'lib/markedly/asset.rb', line 13 def initialize(path) @path = path ext = File.extname(@path) @name = File.basename(path, ext) prepare_href end |
Instance Attribute Details
#href ⇒ Object (readonly)
Returns the value of attribute href.
11 12 13 |
# File 'lib/markedly/asset.rb', line 11 def href @href end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/markedly/asset.rb', line 9 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
10 11 12 |
# File 'lib/markedly/asset.rb', line 10 def path @path end |
Instance Method Details
#remote? ⇒ Boolean
20 21 22 |
# File 'lib/markedly/asset.rb', line 20 def remote? @remote end |