Class: Logux::RakeTasks

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/logux/rake_tasks.rb

Constant Summary collapse

ACTIONS_NAMESPACE =
'Actions'
CHANNELS_NAMESPACE =
'Channels'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = :logux) ⇒ RakeTasks

rubocop:disable Metrics/AbcSize, Metrics/MethodLength



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/logux/rake_tasks.rb', line 23

def initialize(name = :logux)
  setup(name)
  namespace(name) do
    desc 'Lists all Logux action types'
    task(:actions, [:actions_path]) do |_, task_args|
      task_args.with_defaults(actions_path: default_actions_path)
      require_all(task_args.actions_path)
      report(ACTIONS_HEAD, action_types)
    end

    desc 'Lists all Logux channel'
    task(:channels, [:channels_path]) do |_, task_args|
      task_args.with_defaults(channels_path: default_channels_path)
      require_all(task_args.channels_path)
      report(CHANNELS_HEAD, channels)
    end
  end
end

Instance Attribute Details

#fail_on_errorObject

Returns the value of attribute fail_on_error.



11
12
13
# File 'lib/logux/rake_tasks.rb', line 11

def fail_on_error
  @fail_on_error
end

#formattersObject

Returns the value of attribute formatters.



13
14
15
# File 'lib/logux/rake_tasks.rb', line 13

def formatters
  @formatters
end

#nameObject

Returns the value of attribute name.



9
10
11
# File 'lib/logux/rake_tasks.rb', line 9

def name
  @name
end

#optionsObject

Returns the value of attribute options.



15
16
17
# File 'lib/logux/rake_tasks.rb', line 15

def options
  @options
end

#patternsObject

Returns the value of attribute patterns.



12
13
14
# File 'lib/logux/rake_tasks.rb', line 12

def patterns
  @patterns
end

#requiresObject

Returns the value of attribute requires.



14
15
16
# File 'lib/logux/rake_tasks.rb', line 14

def requires
  @requires
end

#verboseObject

Returns the value of attribute verbose.



10
11
12
# File 'lib/logux/rake_tasks.rb', line 10

def verbose
  @verbose
end