Class: Rubycc::Pkgconf::Package

Inherits:
Object
  • Object
show all
Defined in:
lib/rubycc/pkgconf/model.rb

Overview

One parsed .pc file: the handful of fields mkmf's pkg_config() and its own Requires chain ever touch. cflags/libs/libs_private are the field text after ${var} expansion, still a raw (unsplit) string — Resolver is the one that shellsplits it into tokens, since only Resolver knows whether a field is being consumed for --cflags or --libs.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, description:, version:, requires:, requires_private:, cflags:, libs:, libs_private:, path:) ⇒ Package

Returns a new instance of Package.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/rubycc/pkgconf/model.rb', line 14

def initialize(name:, description:, version:, requires:, requires_private:,
               cflags:, libs:, libs_private:, path:)
  @name = name
  @description = description
  @version = version
  @requires = requires
  @requires_private = requires_private
  @cflags = cflags
  @libs = libs
  @libs_private = libs_private
  @path = path
end

Instance Attribute Details

#cflagsObject (readonly)

Returns the value of attribute cflags.



11
12
13
# File 'lib/rubycc/pkgconf/model.rb', line 11

def cflags
  @cflags
end

#descriptionObject (readonly)

Returns the value of attribute description.



11
12
13
# File 'lib/rubycc/pkgconf/model.rb', line 11

def description
  @description
end

#libsObject (readonly)

Returns the value of attribute libs.



11
12
13
# File 'lib/rubycc/pkgconf/model.rb', line 11

def libs
  @libs
end

#libs_privateObject (readonly)

Returns the value of attribute libs_private.



11
12
13
# File 'lib/rubycc/pkgconf/model.rb', line 11

def libs_private
  @libs_private
end

#nameObject (readonly)

Returns the value of attribute name.



11
12
13
# File 'lib/rubycc/pkgconf/model.rb', line 11

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



11
12
13
# File 'lib/rubycc/pkgconf/model.rb', line 11

def path
  @path
end

#requiresObject (readonly)

Returns the value of attribute requires.



11
12
13
# File 'lib/rubycc/pkgconf/model.rb', line 11

def requires
  @requires
end

#requires_privateObject (readonly)

Returns the value of attribute requires_private.



11
12
13
# File 'lib/rubycc/pkgconf/model.rb', line 11

def requires_private
  @requires_private
end

#versionObject (readonly)

Returns the value of attribute version.



11
12
13
# File 'lib/rubycc/pkgconf/model.rb', line 11

def version
  @version
end