class Ro::Node::Asset
Constants
- IMAGE_RE
Public Class Methods
new(name, options = {})
click to toggle source
Calls superclass method
# File lib/ro/node.rb, line 157 def initialize(name, options = {}) super(name) ensure options = Map.for(options) Asset.fattrs.each do |attr| if options.has_key?(attr) value = options[attr] send(attr, value) end end end
Public Instance Methods
basename()
click to toggle source
# File lib/ro/node.rb, line 186 def basename File.basename(path.to_s) end
extension()
click to toggle source
# File lib/ro/node.rb, line 180 def extension base, ext = basename.split('.', 2) ext end
Also aliased as: ext
image?()
click to toggle source
# File lib/ro/node.rb, line 176 def image? !!(self =~ IMAGE_RE) end
name()
click to toggle source
# File lib/ro/node.rb, line 170 def name self end