Sha256: cfe88743816643501224d3df2d7989eb79a97a7512d572d0634956e1271886ca

Contents?: true

Size: 564 Bytes

Versions: 1

Compression:

Stored size: 564 Bytes

Contents

# encoding: UTF-8

module Bunto
  module Drops
    class BuntoDrop < Liquid::Drop
      class << self
        def global
          @global ||= BuntoDrop.new
        end
      end

      def version
        Bunto::VERSION
      end

      def environment
        Bunto.env
      end

      def to_h
        @to_h ||= {
          "version"     => version,
          "environment" => environment
        }
      end

      def to_json(state = nil)
        require "json"
        JSON.generate(to_h, state)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bunto-3.2.1 lib/bunto/drops/bunto_drop.rb