Sha256: 405f97a8d4e84087e2030cbc40f46d8e0a7b1bc720b78fff5e15f13ecd42fa2c

Contents?: true

Size: 484 Bytes

Versions: 3

Compression:

Stored size: 484 Bytes

Contents

require File.expand_path('../command', File.dirname(__FILE__))

module Nesta
  module Commands
    module Theme
      class Enable
        include Command

        def initialize(*args)
          name = args.shift
          options = args.shift || {}
          name.nil? && (raise UsageError.new('name not specified'))
          @name = name
        end

        def execute
          update_config_yaml(/^\s*#?\s*theme:.*/, "theme: #{@name}")
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nesta-0.12.0 lib/nesta/commands/theme/enable.rb
nesta-0.11.1 lib/nesta/commands/theme/enable.rb
nesta-0.11.0 lib/nesta/commands/theme/enable.rb