Class: Ptero::Generator::StylesheetGenerator

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

Overview

Generator for stylesheets

Direct Known Subclasses

ApplicationStylesheetGenerator

Constant Summary

Constants inherited from Ptero::Generator

TEMPLATE_PATH

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…”)



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

def initialize(name,desc = 'The purpose of this stylesheet is...')
  super name.downcase
  @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



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

def extension
  'css'
end

#pathString



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

def path
  'www/assets/css'
end