Module: Write

Defined in:
lib/write.rb,
lib/write/engine.rb,
lib/write/version.rb,
app/models/write/gg.rb,
app/helpers/write/application_helper.rb,
app/controllers/write/posts_controller.rb,
app/controllers/write/application_controller.rb

Defined Under Namespace

Modules: ApplicationHelper Classes: ApplicationController, Engine, GG, PostsController, PygmentizeHTML

Constant Summary collapse

MD =
Redcarpet::Markdown.new(PygmentizeHTML, :fenced_code_blocks => true, :autolink => true,
:lax_spacing => true, :space_after_headers => true,
:strikethrough => true, :superscript => true)
VERSION =
"0.2.5"

Class Method Summary collapse

Class Method Details

.accountsObject



11
12
13
14
# File 'lib/write.rb', line 11

def self.accounts
  accounts = config[:accounts].presence || { "github" => "changeme" }
  accounts.is_a?(Hash) ? accounts.keys : accounts
end

.admin?(account) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/write.rb', line 16

def self.admin? 
  accounts.include? 
end

.feed_urlObject



32
33
34
# File 'lib/write.rb', line 32

def self.feed_url
  config[:feed_url]
end

.full_titleObject



28
29
30
# File 'lib/write.rb', line 28

def self.full_title
  [tagline, title].join(" - ")
end

.layoutObject



36
37
38
# File 'lib/write.rb', line 36

def self.layout
  config[:layout] || "application"
end

.taglineObject



24
25
26
# File 'lib/write.rb', line 24

def self.tagline
  config[:tagline].presence
end

.titleObject



20
21
22
# File 'lib/write.rb', line 20

def self.title
  config[:title] || "This is a Blog"
end