Class: Pageflow::Theme

Inherits:
Object
  • Object
show all
Defined in:
lib/pageflow/theme.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, options = {}) ⇒ Theme

Returns a new instance of Theme.



5
6
7
8
9
# File 'lib/pageflow/theme.rb', line 5

def initialize(name, options = {})
  @name = name.to_s
  @directory_name = name.to_s
  @options = options
end

Instance Attribute Details

#directory_nameObject (readonly)

Returns the value of attribute directory_name.



3
4
5
# File 'lib/pageflow/theme.rb', line 3

def directory_name
  @directory_name
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/pageflow/theme.rb', line 3

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/pageflow/theme.rb', line 3

def options
  @options
end

Instance Method Details

#has_home_button?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/pageflow/theme.rb', line 15

def has_home_button?
  !@options[:no_home_button]
end

#stylesheet_pathObject



11
12
13
# File 'lib/pageflow/theme.rb', line 11

def stylesheet_path
  "pageflow/themes/#{name}.css"
end