Class: Ptero::Generator::StylesheetGenerator

Inherits:
Ptero::Generator show all
Defined in:
lib/ptero/generators/stylesheetgenerator.rb

Overview

Generator for stylesheets

Direct Known Subclasses

ApplicationStylesheetGenerator

Instance Attribute Summary collapse

Attributes inherited from Ptero::Generator

#app, #dir, #name

Instance Method Summary collapse

Methods inherited from Ptero::Generator

const_missing, #content, #content_params, #filename, #generate, #generated?, #location, #reload, #remove, #template_path, #to_s, #type

Constructor Details

#initialize(name, desc = 'The purpose of this stylesheet is...') ⇒ StylesheetGenerator

Generate with name and optional description that will be generated in a comment (Defaults to “The purpose of this stylesheet is…”)

Parameters:

  • name (String)

    the name of the stylesheet

  • desc (String) (defaults to: 'The purpose of this stylesheet is...')

    a String to describe this stylesheet



15
16
17
18
# File 'lib/ptero/generators/stylesheetgenerator.rb', line 15

def initialize(name,desc = 'The purpose of this stylesheet is...')
  super name
  @desc = desc
end

Instance Attribute Details

#descObject (readonly)

Returns the value of attribute desc.



20
21
22
# File 'lib/ptero/generators/stylesheetgenerator.rb', line 20

def desc
  @desc
end

Instance Method Details

#extensionString

Returns “css”.

Returns:

  • (String)

    “css”



23
24
25
# File 'lib/ptero/generators/stylesheetgenerator.rb', line 23

def extension
  'css'
end

#pathString

Returns “www/assets/css”.

Returns:

  • (String)

    “www/assets/css”



28
29
30
# File 'lib/ptero/generators/stylesheetgenerator.rb', line 28

def path
  'www/assets/css'
end