Class: GemLint::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/gem_lint/runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename) ⇒ Runner

Returns a new instance of Runner.

Raises:

  • (ArgumentError)


9
10
11
12
13
14
# File 'lib/gem_lint/runner.rb', line 9

def initialize(filename)
  raise ArgumentError, "'#{filename}' does not exist" unless File.file?(filename.to_s)

  @filename = filename
  init_vars
end

Instance Attribute Details

#emailObject (readonly)

Returns the value of attribute email.



7
8
9
# File 'lib/gem_lint/runner.rb', line 7

def email
  @email
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/gem_lint/runner.rb', line 7

def name
  @name
end

#platformObject (readonly)

Returns the value of attribute platform.



7
8
9
# File 'lib/gem_lint/runner.rb', line 7

def platform
  @platform
end

#tagsObject (readonly)

Returns the value of attribute tags.



6
7
8
# File 'lib/gem_lint/runner.rb', line 6

def tags
  @tags
end

#versionObject (readonly)

Returns the value of attribute version.



7
8
9
# File 'lib/gem_lint/runner.rb', line 7

def version
  @version
end

Instance Method Details

#to_s(type = :simple) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/gem_lint/runner.rb', line 16

def to_s(type = :simple)
  if type == :simple
    @tags.map { |t| "- #{t}"}.join("\n")
  else
    lines.join("\n")
  end
end