Class: Lono::Configset::Registry

Inherits:
Object
  • Object
show all
Defined in:
lib/lono/configset/registry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args, options) ⇒ Registry

Returns a new instance of Registry.



5
6
7
# File 'lib/lono/configset/registry.rb', line 5

def initialize(args, options)
  @args, @options = args, options
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



3
4
5
# File 'lib/lono/configset/registry.rb', line 3

def args
  @args
end

#caller_lineObject

Returns the value of attribute caller_line.



4
5
6
# File 'lib/lono/configset/registry.rb', line 4

def caller_line
  @caller_line
end

#depends_onObject

Returns the value of attribute depends_on.



4
5
6
# File 'lib/lono/configset/registry.rb', line 4

def depends_on
  @depends_on
end

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/lono/configset/registry.rb', line 3

def options
  @options
end

#parentObject

Returns the value of attribute parent.



4
5
6
# File 'lib/lono/configset/registry.rb', line 4

def parent
  @parent
end

Instance Method Details

#gem_optionsObject



21
22
23
24
25
26
27
28
# File 'lib/lono/configset/registry.rb', line 21

def gem_options
  options = @options.dup
  # Delete special options that is not supported by bundler Gemfile
  options.delete(:repo)
  options.delete(:resource)
  options.delete(:vars)
  options
end

#nameObject



9
10
11
# File 'lib/lono/configset/registry.rb', line 9

def name
  @args.first
end

#resourceObject



13
14
15
# File 'lib/lono/configset/registry.rb', line 13

def resource
  @options[:resource]
end

#resource=(v) ⇒ Object



17
18
19
# File 'lib/lono/configset/registry.rb', line 17

def resource=(v)
  @options[:resource] = v
end

#varsObject



30
31
32
# File 'lib/lono/configset/registry.rb', line 30

def vars
  options[:vars] || {}
end