Class: Gemat::InDsl
- Inherits:
-
Object
- Object
- Gemat::InDsl
- Defined in:
- lib/in_dsl.rb
Instance Attribute Summary collapse
-
#dependencies ⇒ Object
Returns the value of attribute dependencies.
-
#gemfiles ⇒ Object
Returns the value of attribute gemfiles.
-
#git_sources ⇒ Object
Returns the value of attribute git_sources.
-
#groups ⇒ Object
Returns the value of attribute groups.
-
#sources ⇒ Object
Returns the value of attribute sources.
Instance Method Summary collapse
-
#initialize(gemfile = nil) ⇒ InDsl
constructor
rubocop:disable Metrics/MethodLength.
Constructor Details
#initialize(gemfile = nil) ⇒ InDsl
rubocop:disable Metrics/MethodLength
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/in_dsl.rb', line 8 def initialize(gemfile = nil) gemfile ||= Bundler.default_gemfile.to_s dsl = Bundler::Dsl.new dsl.eval_gemfile(gemfile) class << dsl attr_accessor :sources, :git_sources, :groups, :gemfiles end @dependencies = dsl.dependencies @sources = dsl.sources @git_sources = dsl.git_sources @groups = dsl.groups @gemfiles = dsl.gemfiles end |
Instance Attribute Details
#dependencies ⇒ Object
Returns the value of attribute dependencies.
5 6 7 |
# File 'lib/in_dsl.rb', line 5 def dependencies @dependencies end |
#gemfiles ⇒ Object
Returns the value of attribute gemfiles.
5 6 7 |
# File 'lib/in_dsl.rb', line 5 def gemfiles @gemfiles end |
#git_sources ⇒ Object
Returns the value of attribute git_sources.
5 6 7 |
# File 'lib/in_dsl.rb', line 5 def git_sources @git_sources end |
#groups ⇒ Object
Returns the value of attribute groups.
5 6 7 |
# File 'lib/in_dsl.rb', line 5 def groups @groups end |
#sources ⇒ Object
Returns the value of attribute sources.
5 6 7 |
# File 'lib/in_dsl.rb', line 5 def sources @sources end |