Sha256: 56efd7a8e743759872e859f61bdc7d848765be63ce87bb4f7a5b453bd23a2039

Contents?: true

Size: 577 Bytes

Versions: 18

Compression:

Stored size: 577 Bytes

Contents

module Betterdocs
  module Generator
    module ConfigShortcuts
      def config
        Betterdocs::Global.config
      end

      def project_name
        config.project_name
      end

      def sections
        Dir[config.api_controllers.to_s].each(&method(:load))
        config.sections
      end

      def section(name)
        name = name.to_sym
        config.section(name) or STDERR.puts "Section #{name.inspect} does not exist: Link in readme file won't work."
        "sections/#{name}"
      end

      def api_base_url
        config
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
betterdocs-0.9.0 lib/betterdocs/generator/config_shortcuts.rb
betterdocs-0.8.1 lib/betterdocs/generator/config_shortcuts.rb
betterdocs-0.8.0 lib/betterdocs/generator/config_shortcuts.rb
betterdocs-0.7.1 lib/betterdocs/generator/config_shortcuts.rb
betterdocs-0.7.0 lib/betterdocs/generator/config_shortcuts.rb
betterdocs-0.6.8 lib/betterdocs/generator/config_shortcuts.rb
betterdocs-0.6.7 lib/betterdocs/generator/config_shortcuts.rb
betterdocs-0.6.6 lib/betterdocs/generator/config_shortcuts.rb
betterdocs-0.6.5 lib/betterdocs/generator/config_shortcuts.rb
betterdocs-0.6.4 lib/betterdocs/generator/config_shortcuts.rb
betterdocs-0.6.3 lib/betterdocs/generator/config_shortcuts.rb
betterdocs-0.6.2 lib/betterdocs/generator/config_shortcuts.rb
betterdocs-0.6.1 lib/betterdocs/generator/config_shortcuts.rb
betterdocs-0.6.0 lib/betterdocs/generator/config_shortcuts.rb
betterdocs-0.5.0 lib/betterdocs/generator/config_shortcuts.rb
betterdocs-0.4.0 lib/betterdocs/generator/config_shortcuts.rb
betterdocs-0.3.0 lib/betterdocs/generator/config_shortcuts.rb
betterdocs-0.2.0 lib/betterdocs/generator/config_shortcuts.rb