Class: Sod::Prefabs::Actions::Config::View
- Defined in:
- lib/sod/prefabs/actions/config/view.rb
Overview
Displays project configuration.
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(path = nil) ⇒ View
constructor
:reek:ControlParameter.
Methods inherited from Action
ancillary, default, description, inherited, #inspect, on, #to_proc
Constructor Details
#initialize(path = nil) ⇒ View
:reek:ControlParameter
20 21 22 23 |
# File 'lib/sod/prefabs/actions/config/view.rb', line 20 def initialize(path = nil, **) super(**) @path = Pathname(path || context.xdg_config.active) end |
Instance Method Details
#call ⇒ Object
25 26 27 28 29 30 |
# File 'lib/sod/prefabs/actions/config/view.rb', line 25 def call(*) return unless check logger.info { "Viewing (#{path.to_s.inspect}):" } io.puts path.read end |