Class: Commands::Init::FileDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/commands/init/file_definition.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ FileDefinition

Options should indicate :content or :local_path, but not both



9
10
11
12
13
# File 'lib/commands/init/file_definition.rb', line 9

def initialize(options)
  @path = options[:path]
  @content = options[:content] if options.key?(:content)
  @local_path = options[:local_path] if options.key?(:local_path)
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



6
7
8
# File 'lib/commands/init/file_definition.rb', line 6

def content
  @content
end

#local_pathObject

Returns the value of attribute local_path.



6
7
8
# File 'lib/commands/init/file_definition.rb', line 6

def local_path
  @local_path
end

#pathObject

Returns the value of attribute path.



6
7
8
# File 'lib/commands/init/file_definition.rb', line 6

def path
  @path
end