Class: Marksman::Theme
- Inherits:
-
Object
- Object
- Marksman::Theme
- Includes:
- Equality
- Defined in:
- lib/marksman/theme.rb
Instance Method Summary collapse
-
#initialize(name) ⇒ Theme
constructor
A new instance of Theme.
- #path ⇒ Object
Methods included from Equality
Constructor Details
#initialize(name) ⇒ Theme
Returns a new instance of Theme.
5 6 7 |
# File 'lib/marksman/theme.rb', line 5 def initialize(name) @name = name end |
Instance Method Details
#path ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/marksman/theme.rb', line 9 def path @path ||= if File.directory?(@name) Pathname.new @name else Pathname.new(File.dirname(__FILE__)) .join('../../') .join('themes') .join(@name) end end |