Sha256: cfa2c9aae4a89ba1f22f96b7be2fdb9a68e866fe6271b21528a73da39d524a0d

Contents?: true

Size: 1.07 KB

Versions: 8

Compression:

Stored size: 1.07 KB

Contents

module HammerCLIForeman

  class Trend < HammerCLIForeman::Command

    resource :trends

    class ListCommand < HammerCLIForeman::ListCommand
      output do
        field :id, _("Id")
        field :name, _("Name")
        field :label, _("Label")
      end

      build_options
    end

    class CreateCommand < HammerCLIForeman::CreateCommand
      success_message _("Trend for %<trendable_type>s created.")
      failure_message _("Could not create the trend")

      build_options
    end

    class DeleteCommand < HammerCLIForeman::DeleteCommand
      success_message _("Trend for %<trendable_type>s deleted.")
      failure_message _("Could not delete the trend")

      build_options
    end

    class InfoCommand < HammerCLIForeman::InfoCommand
      output do
        field :id, _('Id')
        field :name, _('Name')
        field :label, _("Label")
        field :trendable_type, _('Type')
        HammerCLIForeman::References.taxonomies(self)
        HammerCLIForeman::References.timestamps(self)
      end

      build_options
    end

    autoload_subcommands
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
hammer_cli_foreman-2.1.3 lib/hammer_cli_foreman/trend.rb
hammer_cli_foreman-2.2.0 lib/hammer_cli_foreman/trend.rb
hammer_cli_foreman-2.1.2 lib/hammer_cli_foreman/trend.rb
hammer_cli_foreman-2.1.1 lib/hammer_cli_foreman/trend.rb
hammer_cli_foreman-2.1.0 lib/hammer_cli_foreman/trend.rb
hammer_cli_foreman-2.0.2 lib/hammer_cli_foreman/trend.rb
hammer_cli_foreman-2.0.1 lib/hammer_cli_foreman/trend.rb
hammer_cli_foreman-2.0.0 lib/hammer_cli_foreman/trend.rb