Class: Drakkon::Gems::Gem
- Inherits:
-
Object
- Object
- Drakkon::Gems::Gem
- Includes:
- GemHelpers
- Defined in:
- lib/drakkon/gem/gem.rb
Overview
General Encompasing thingy
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#config ⇒ Object
Returns the value of attribute config.
-
#data ⇒ Object
Returns the value of attribute data.
-
#modules ⇒ Object
Returns the value of attribute modules.
-
#name ⇒ Object
Returns the value of attribute name.
-
#opts ⇒ Object
Returns the value of attribute opts.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
- #edit(name, details, action = :modules) ⇒ Object
-
#initialize(opts = {}) ⇒ Gem
constructor
A new instance of Gem.
- #intall_setup(args) ⇒ Object
- #prompt_source ⇒ Object
- #update_gem_data ⇒ Object
Methods included from GemHelpers
#config_file, #do_the_check, #file_edit, #files_exist?, #load_modules, #module_duplicates, #module_duplicates?, #module_index, #path?, #path_files, #prompt, #prompt_file, #prompt_modules, #read_config, #refresh_modules, #select_files, #select_modules, #source?, #source_setup, #sources, #valid_mod?, #valid_structure?, #valid_version?
Constructor Details
#initialize(opts = {}) ⇒ Gem
Returns a new instance of Gem.
12 13 14 15 |
# File 'lib/drakkon/gem/gem.rb', line 12 def initialize(opts = {}) @opts = opts @data = {} end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
10 11 12 |
# File 'lib/drakkon/gem/gem.rb', line 10 def args @args end |
#config ⇒ Object
Returns the value of attribute config.
10 11 12 |
# File 'lib/drakkon/gem/gem.rb', line 10 def config @config end |
#data ⇒ Object
Returns the value of attribute data.
10 11 12 |
# File 'lib/drakkon/gem/gem.rb', line 10 def data @data end |
#modules ⇒ Object
Returns the value of attribute modules.
10 11 12 |
# File 'lib/drakkon/gem/gem.rb', line 10 def modules @modules end |
#name ⇒ Object
Returns the value of attribute name.
10 11 12 |
# File 'lib/drakkon/gem/gem.rb', line 10 def name @name end |
#opts ⇒ Object
Returns the value of attribute opts.
10 11 12 |
# File 'lib/drakkon/gem/gem.rb', line 10 def opts @opts end |
#source ⇒ Object
Returns the value of attribute source.
10 11 12 |
# File 'lib/drakkon/gem/gem.rb', line 10 def source @source end |
Instance Method Details
#edit(name, details, action = :modules) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/drakkon/gem/gem.rb', line 17 def edit(name, details, action = :modules) @name = name.to_sym @source = details[:source] @data = details[:data] do_the_check(installing: false) case action when :modules then select_modules when :files then select_files when :refresh then refresh_modules end update_gem_data end |
#intall_setup(args) ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/drakkon/gem/gem.rb', line 32 def intall_setup(args) @args = args source_setup do_the_check select_modules update_gem_data end |
#prompt_source ⇒ Object
51 |
# File 'lib/drakkon/gem/gem.rb', line 51 def prompt_source; end |