Sha256: aadd8fde9d712b11501754fe36a38e9cec28e94686620b0ce6624f9912d45a72

Contents?: true

Size: 1.09 KB

Versions: 3

Compression:

Stored size: 1.09 KB

Contents

#
# Copyright 2012 Mortar Data Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

require "mortar/command/base"

# list available pigscripts
#
class Mortar::Command::PigScripts < Mortar::Command::Base
    
  # pigscripts
  #
  # Display the available set of pigscripts
  #
  #Examples:
  #
  # $ mortar pigscripts
  # 
  #=== pigscripts
  #hourly_top_searchers
  #user_engagement
  #
  def index
    # validation
    validate_arguments!
    if project.pigscripts.any?
      styled_header("pigscripts")
      styled_array(project.pigscripts.keys)
    else
      display("You have no pigscripts.")
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mortar-0.3.0 lib/mortar/command/pigscripts.rb
mortar-0.2.1 lib/mortar/command/pigscripts.rb
mortar-0.2.0 lib/mortar/command/pigscripts.rb