Class: OneshotGenerator::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/oneshot/oneshot_generator/configuration.rb

Constant Summary collapse

DEFAULT_DIRECTORY =
'lib/tasks/oneshot'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argumentsObject

Returns the value of attribute arguments.



5
6
7
# File 'lib/generators/oneshot/oneshot_generator/configuration.rb', line 5

def arguments
  @arguments
end

#bodyObject

Returns the value of attribute body.



5
6
7
# File 'lib/generators/oneshot/oneshot_generator/configuration.rb', line 5

def body
  @body
end

Instance Method Details

#directoryObject



7
8
9
# File 'lib/generators/oneshot/oneshot_generator/configuration.rb', line 7

def directory
  @directory || DEFAULT_DIRECTORY
end

#directory=(dir) ⇒ Object



11
12
13
# File 'lib/generators/oneshot/oneshot_generator/configuration.rb', line 11

def directory=(dir)
  @directory = dir
end