Module: MiniviteRails

Defined in:
lib/minivite_rails.rb,
lib/minivite_rails/version.rb,
lib/minivite_rails/manifest.rb,
lib/minivite_rails/tag_helpers.rb,
lib/minivite_rails/configuration.rb

Overview

Defined Under Namespace

Modules: TagHelpers Classes: Configuration, Manifest

Constant Summary collapse

VERSION =
'0.2.0'

Class Method Summary collapse

Class Method Details

.configuration {|@configuration| ... } ⇒ Object

Yields:



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

def configuration
  @configuration ||= Configuration.new
  yield @configuration if block_given?
  @configuration
end

.manifest(id: nil) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/minivite_rails.rb', line 17

def manifest(id: nil)
  raise 'MiniviteRails is not configured' if @configuration.nil?

  return @configuration.manifest if id.nil?

  @configuration.child_by_id(id).manifest
end