Class: Bridgetown::Drops::BridgetownDrop
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Bridgetown::Drops::BridgetownDrop
- Defined in:
- bridgetown-core/lib/bridgetown-core/drops/bridgetown_drop.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#code_name ⇒ Object
-
#environment ⇒ Object
-
#to_h ⇒ Object
-
#to_json(state = nil) ⇒ Object
-
#version ⇒ Object
Class Method Details
.global ⇒ Object
7 8 9 |
# File 'bridgetown-core/lib/bridgetown-core/drops/bridgetown_drop.rb', line 7 def global @global ||= BridgetownDrop.new end |
Instance Method Details
#code_name ⇒ Object
16 17 18 |
# File 'bridgetown-core/lib/bridgetown-core/drops/bridgetown_drop.rb', line 16 def code_name Bridgetown::CODE_NAME end |
#environment ⇒ Object
20 21 22 |
# File 'bridgetown-core/lib/bridgetown-core/drops/bridgetown_drop.rb', line 20 def environment Bridgetown.environment end |
#to_h ⇒ Object
24 25 26 27 28 29 30 |
# File 'bridgetown-core/lib/bridgetown-core/drops/bridgetown_drop.rb', line 24 def to_h @to_h ||= { "version" => version, "code_name" => code_name, "environment" => environment, } end |
#to_json(state = nil) ⇒ Object
32 33 34 |
# File 'bridgetown-core/lib/bridgetown-core/drops/bridgetown_drop.rb', line 32 def to_json(state = nil) JSON.generate(to_h, state) end |
#version ⇒ Object
12 13 14 |
# File 'bridgetown-core/lib/bridgetown-core/drops/bridgetown_drop.rb', line 12 def version Bridgetown::VERSION end |