Class: Marksman::Theme

Inherits:
Object
  • Object
show all
Includes:
Equality
Defined in:
lib/marksman/theme.rb

Instance Method Summary collapse

Methods included from Equality

#==, #attributes

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

#pathObject



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