Class: RubyNPM::Options::Definitions::Workspaces

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_npm/options/definitions/workspaces.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeWorkspaces

Returns a new instance of Workspaces.



13
14
15
16
# File 'lib/ruby_npm/options/definitions/workspaces.rb', line 13

def initialize
  @workspace_name = Name.new('--workspace')
  @workspaces_name = Name.new('--workspaces')
end

Instance Attribute Details

#workspace_nameObject (readonly)

Returns the value of attribute workspace_name.



11
12
13
# File 'lib/ruby_npm/options/definitions/workspaces.rb', line 11

def workspace_name
  @workspace_name
end

#workspaces_nameObject (readonly)

Returns the value of attribute workspaces_name.



11
12
13
# File 'lib/ruby_npm/options/definitions/workspaces.rb', line 11

def workspaces_name
  @workspaces_name
end

Instance Method Details

#build(parameters) ⇒ Object



22
23
24
25
# File 'lib/ruby_npm/options/definitions/workspaces.rb', line 22

def build(parameters)
  build_workspace_options(parameters) +
    build_workspaces_option(parameters)
end

#matches?(name) ⇒ Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/ruby_npm/options/definitions/workspaces.rb', line 18

def matches?(name)
  workspaces_name == Name.new(name)
end