Class: QueryStream::Configuration
- Inherits:
-
Object
- Object
- QueryStream::Configuration
- Defined in:
- lib/query_stream/configuration.rb
Overview
グローバル設定クラス
Instance Attribute Summary collapse
-
#data_dir ⇒ String
データファイルのディレクトリ.
-
#default_format ⇒ Symbol
スタイル省略時のデフォルト出力形式(:md / :html / :json).
-
#logger ⇒ Logger
ログ出力先.
-
#post_render ⇒ Proc?
1 記法の展開結果を、コンテキスト付きで呼び出し元へ通す後段フィルタ。 gem 自身は用途を規定しない(画像パス解決など呼び出し元固有の後処理を担わせる)。.
-
#templates_dir ⇒ String
テンプレートファイルのディレクトリ.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
33 34 35 36 37 38 39 |
# File 'lib/query_stream/configuration.rb', line 33 def initialize @data_dir = 'data' @templates_dir = 'templates' @default_format = :md @logger = Logger.new($stdout) @post_render = nil end |
Instance Attribute Details
#data_dir ⇒ String
Returns データファイルのディレクトリ.
17 18 19 |
# File 'lib/query_stream/configuration.rb', line 17 def data_dir @data_dir end |
#default_format ⇒ Symbol
Returns スタイル省略時のデフォルト出力形式(:md / :html / :json).
23 24 25 |
# File 'lib/query_stream/configuration.rb', line 23 def default_format @default_format end |
#logger ⇒ Logger
Returns ログ出力先.
26 27 28 |
# File 'lib/query_stream/configuration.rb', line 26 def logger @logger end |
#post_render ⇒ Proc?
1 記法の展開結果を、コンテキスト付きで呼び出し元へ通す後段フィルタ。 gem 自身は用途を規定しない(画像パス解決など呼び出し元固有の後処理を担わせる)。
31 32 33 |
# File 'lib/query_stream/configuration.rb', line 31 def post_render @post_render end |
#templates_dir ⇒ String
Returns テンプレートファイルのディレクトリ.
20 21 22 |
# File 'lib/query_stream/configuration.rb', line 20 def templates_dir @templates_dir end |