Class: Standard::Faker::Plugin

Inherits:
LintRoller::Plugin
  • Object
show all
Defined in:
lib/standard/faker/plugin.rb

Instance Method Summary collapse

Instance Method Details

#aboutObject



6
7
8
9
10
11
12
13
# File 'lib/standard/faker/plugin.rb', line 6

def about
  LintRoller::About.new(
    name: "standard-faker",
    version: VERSION,
    homepage: "https://github.com/shilin-anton/standard-faker",
    description: "Configuration for rubocop-faker rules."
  )
end

#rules(context) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/standard/faker/plugin.rb', line 19

def rules(context)
  trick_rubocop_into_thinking_we_required_rubocop_faker!

  LintRoller::Rules.new(
    type: :object,
    config_format: :rubocop,
    value: YAML.load_file(Pathname.new(__dir__).join("../../../config/base.yml"), aliases: true)
  )
end

#supported?(context) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/standard/faker/plugin.rb', line 15

def supported?(context)
  true
end