Class: Fabrique::GemDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/fabrique/gem_definition.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(defn) ⇒ GemDefinition

Returns a new instance of GemDefinition.



7
8
9
10
# File 'lib/fabrique/gem_definition.rb', line 7

def initialize(defn)
  @dependency = Gem::Dependency.new(defn["name"], defn["version"] || Gem::Requirement.default)
  @required_as = defn["require"] || defn["name"]
end

Instance Attribute Details

#dependencyObject (readonly)

Returns the value of attribute dependency.



5
6
7
# File 'lib/fabrique/gem_definition.rb', line 5

def dependency
  @dependency
end

#required_asObject (readonly)

Returns the value of attribute required_as.



5
6
7
# File 'lib/fabrique/gem_definition.rb', line 5

def required_as
  @required_as
end