Class: FlutterRb::Pubspec

Inherits:
Object
  • Object
show all
Defined in:
lib/flutter_rb/project/specs/flutter/pubspec.rb

Overview

Represents a parsed pubspec.yaml file.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, pubspec_info, dev_dependencies, platform_plugins) ⇒ Pubspec

Initializes a new instance of Pubspec.

Parameters:

  • path (String)

    The path to the pubspec.yaml file.

  • pubspec_info (PubspecInfo)

    The parsed information from the pubspec.yaml file.

  • dev_dependencies (Array<DevDependency>)

    An array of parsed dev dependencies.

  • platform_plugins (Array<PlatformPlugin>)

    An array of parsed platform plugins.



16
17
18
19
20
21
# File 'lib/flutter_rb/project/specs/flutter/pubspec.rb', line 16

def initialize(path, pubspec_info, dev_dependencies, platform_plugins)
  @path = path
  @pubspec_info = pubspec_info
  @dev_dependencies = dev_dependencies
  @platform_plugins = platform_plugins
end

Instance Attribute Details

#dev_dependenciesArray<DevDependency> (readonly)

Returns an array of parsed dev dependencies.

Returns:

  • (Array<DevDependency>)

    An array of parsed dev dependencies.



36
37
38
# File 'lib/flutter_rb/project/specs/flutter/pubspec.rb', line 36

def dev_dependencies
  @dev_dependencies
end

#pathString (readonly)

Returns the path to the pubspec.yaml file.

Returns:

  • (String)

    The path to the pubspec.yaml file.



26
27
28
# File 'lib/flutter_rb/project/specs/flutter/pubspec.rb', line 26

def path
  @path
end

#platform_pluginsArray<PlatformPlugin> (readonly)

Returns an array of parsed platform plugins.

Returns:



41
42
43
# File 'lib/flutter_rb/project/specs/flutter/pubspec.rb', line 41

def platform_plugins
  @platform_plugins
end

#pubspec_infoPubspecInfo (readonly)

Returns the parsed information from the pubspec.yaml file.

Returns:

  • (PubspecInfo)

    The parsed information from the pubspec.yaml file.



31
32
33
# File 'lib/flutter_rb/project/specs/flutter/pubspec.rb', line 31

def pubspec_info
  @pubspec_info
end