Class: Proton

Inherits:
Object
  • Object
show all
Defined in:
lib/proton.rb,
lib/proton/cli.rb,
lib/proton/set.rb,
lib/proton/meta.rb,
lib/proton/page.rb,
lib/proton/config.rb,
lib/proton/layout.rb,
lib/proton/server.rb,
lib/proton/helpers.rb,
lib/proton/partial.rb,
lib/proton/project.rb,
lib/proton/version.rb,
lib/proton/cacheable.rb,
lib/proton/cli/helpers.rb

Overview

Module: Proton::Helpers Helpers you can use in your pages.

## Creating your own helpers

To create for own helpers, make an extension. See [Extending Proton: 
Helpers][1] for more info.

[1]: /extending/helpers.html

Defined Under Namespace

Modules: Cacheable, Helpers, Server Classes: CLI, Config, Layout, Meta, Page, Partial, Project, Set

Constant Summary collapse

PREFIX =
File.expand_path('../', __FILE__)
Error =

Class: Proton::Error An error.

## Description

The class Error describes any error thrown by the application.

## Example

begin
  Proton::Project.new './my_project/'
rescue Proton::LegacyError => e
  puts "Old version."
rescue Proton::VersionError => e
  puts "The project requires a newer version of Proton."
rescue Proton::Error => e
  puts e
end
Class.new(StandardError)
LegacyError =
Class.new(Error)
VersionError =
Class.new(Error)
CONFIG_FILES =

Constant: CONFIG_FILES (Proton) An array of the allowed config filenames.

['Protonfile', 'proton.conf', '.protonrc', 'hyde.conf', '.hyderc']
VERSION =
"0.3.6"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.projectObject

Attribute: project (Proton) Returns the latest project.

## Example

Proton.project.path(:site)


74
75
76
# File 'lib/proton.rb', line 74

def project
  @project
end

Class Method Details

.versionObject

Attribute: version (Proton) Returns the version.

## Example

Proton.version    #=> "0.2.0"


10
11
12
# File 'lib/proton/version.rb', line 10

def self.version
  VERSION
end