Sha256: b679308e5d144c15595869698ae08b35ab6cb340fb664102643c1831ffd522da

Contents?: true

Size: 731 Bytes

Versions: 3

Compression:

Stored size: 731 Bytes

Contents

# frozen_string_literal: true

require "sod"

module Milestoner
  module CLI
    module Actions
      module Build
        # Handles build layout.
        class Layout < Sod::Action
          include Import[:input]

          description "Set view template layout."

          ancillary "Use false to disable."

          on %w[-L --layout], argument: "[NAME]"

          default { Container[:configuration].build_layout }

          def call(layout = nil) = input.build_layout = parse(layout)

          private

          def parse value
            case value
              in "false" then false
              in String then value
              else default
            end
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
milestoner-17.11.0 lib/milestoner/cli/actions/build/layout.rb
milestoner-17.10.0 lib/milestoner/cli/actions/build/layout.rb
milestoner-17.9.0 lib/milestoner/cli/actions/build/layout.rb