Class: Jekyll::WebmentionIO::Config::JsConfig
- Inherits:
-
Object
- Object
- Jekyll::WebmentionIO::Config::JsConfig
- Defined in:
- lib/jekyll/config.rb
Instance Attribute Summary collapse
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
-
#resource_name ⇒ Object
readonly
Returns the value of attribute resource_name.
-
#resource_url ⇒ Object
readonly
Returns the value of attribute resource_url.
Instance Method Summary collapse
- #deploy? ⇒ Boolean
- #disabled? ⇒ Boolean
-
#initialize(base_url, js_config) ⇒ JsConfig
constructor
A new instance of JsConfig.
- #source? ⇒ Boolean
- #uglify? ⇒ Boolean
Constructor Details
#initialize(base_url, js_config) ⇒ JsConfig
Returns a new instance of JsConfig.
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/jekyll/config.rb', line 262 def initialize(base_url, js_config) if js_config == false @disabled = true return end @disabled = false @destination = js_config['destination'] || 'js' # rubocop:disable Style/RedundantCondition # Apparently this cop is broken... @deploy = js_config['deploy'].nil? ? true : js_config['deploy'] @source = js_config['source'].nil? ? true : js_config['source'] @uglify = js_config['uglify'].nil? ? true : js_config['uglify'] # rubocop:enable Style/RedundantCondition @resource_name = 'JekyllWebmentionIO.js' @resource_url = File.join('', base_url, @destination, @resource_name) end |
Instance Attribute Details
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
260 261 262 |
# File 'lib/jekyll/config.rb', line 260 def destination @destination end |
#resource_name ⇒ Object (readonly)
Returns the value of attribute resource_name.
260 261 262 |
# File 'lib/jekyll/config.rb', line 260 def resource_name @resource_name end |
#resource_url ⇒ Object (readonly)
Returns the value of attribute resource_url.
260 261 262 |
# File 'lib/jekyll/config.rb', line 260 def resource_url @resource_url end |
Instance Method Details
#deploy? ⇒ Boolean
286 |
# File 'lib/jekyll/config.rb', line 286 def deploy?; @deploy; end |
#disabled? ⇒ Boolean
282 |
# File 'lib/jekyll/config.rb', line 282 def disabled?; @disabled; end |
#source? ⇒ Boolean
284 |
# File 'lib/jekyll/config.rb', line 284 def source?; @source; end |
#uglify? ⇒ Boolean
288 |
# File 'lib/jekyll/config.rb', line 288 def uglify?; @uglify; end |