Class: Rundoc::CodeCommand::RundocCommand::RequireArgs

Inherits:
Object
  • Object
show all
Defined in:
lib/rundoc/code_command/rundoc/require.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ RequireArgs

Returns a new instance of RequireArgs.



8
9
10
11
# File 'lib/rundoc/code_command/rundoc/require.rb', line 8

def initialize(path)
  raise "Path must be relative (i.e. start with `.` or `..`. #{path.inspect} does not" unless path.start_with?(".")
  @path = Pathname.new(path)
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



6
7
8
# File 'lib/rundoc/code_command/rundoc/require.rb', line 6

def path
  @path
end