Class: Fabrique::GemDefinition
- Inherits:
-
Object
- Object
- Fabrique::GemDefinition
- Defined in:
- lib/fabrique/gem_definition.rb
Instance Attribute Summary collapse
-
#dependency ⇒ Object
readonly
Returns the value of attribute dependency.
-
#required_as ⇒ Object
readonly
Returns the value of attribute required_as.
Instance Method Summary collapse
-
#initialize(defn) ⇒ GemDefinition
constructor
A new instance of GemDefinition.
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
#dependency ⇒ Object (readonly)
Returns the value of attribute dependency.
5 6 7 |
# File 'lib/fabrique/gem_definition.rb', line 5 def dependency @dependency end |
#required_as ⇒ Object (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 |