Sha256: 4c26b7467b5d71dbbd08a0ef2a8c5808de6095b7ebe2cdca1228c48587242262

Contents?: true

Size: 1.56 KB

Versions: 6

Compression:

Stored size: 1.56 KB

Contents

# frozen_string_literal: true

module Takeltau
  # takeltau info project
  class InfoProject < SubCommandBase
    include LoggingModule
    include SystemModule
    include ConfigModule
    include ProjectModule

    #
    # info project active
    #
    desc 'active', 'Print active project info'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    Print active project info
    LONGDESC
    # Print active project info.
    def active
      project_active_yaml = hash_to_yaml(project.active)
      exit false if project_active_yaml == false
      say project_active_yaml
      true
    end

    #
    # info project private
    #
    desc 'private', 'Print private project info'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    Print private project info
    LONGDESC
    # Print private project info.
    def private
      project_private_yaml = hash_to_yaml(project.private)
      exit false if project_private_yaml == false
      say project_private_yaml
      true
    end

    #
    # info project main
    #
    desc 'main', 'Print main project info'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    Print main project info
    LONGDESC
    # Print main project info.
    def main
      project_main_yaml = hash_to_yaml(project.main)
      exit false if project_main_yaml == false
      say project_main_yaml
      true
    end

    #
    # info project dir
    #
    desc 'dir', 'Print project root directory'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    Print project root directory
    LONGDESC
    # Print project root directory.
    def dir
      say project.dir
      true
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
takeltau-0.34.15 lib/takeltau/info/project/cli.rb
takeltau-0.34.14 lib/takeltau/info/project/cli.rb
takeltau-0.34.13 lib/takeltau/info/project/cli.rb
takeltau-0.34.12 lib/takeltau/info/project/cli.rb
takeltau-0.34.11 lib/takeltau/info/project/cli.rb
takeltau-0.34.9 lib/takeltau/info/project/cli.rb