Class: RTask::Spec
- Inherits:
-
Gem::Specification
- Object
- Gem::Specification
- RTask::Spec
- Defined in:
- lib/rtask/spec.rb
Instance Method Summary collapse
- #array ⇒ Object
- #attributes ⇒ Object
- #bool_attributes ⇒ Object (also: #bool)
-
#initialize(gem_spec = ::Gem::Specification.new) ⇒ Spec
constructor
A new instance of Spec.
- #required ⇒ Object
- #standard ⇒ Object
- #type_of(name) ⇒ Object
Constructor Details
Instance Method Details
#array ⇒ Object
30 31 32 |
# File 'lib/rtask/spec.rb', line 30 def array ::Gem::Specification.array_attributes end |
#attributes ⇒ Object
9 10 11 |
# File 'lib/rtask/spec.rb', line 9 def attributes __getobj__.class.attribute_names end |
#bool_attributes ⇒ Object Also known as: bool
13 14 15 |
# File 'lib/rtask/spec.rb', line 13 def bool_attributes [:has_rdoc] end |
#required ⇒ Object
24 25 26 27 28 |
# File 'lib/rtask/spec.rb', line 24 def required ::Gem::Specification.attribute_names.each do |name| ::Gem::Specification.required_attribute?() end end |
#standard ⇒ Object
17 18 19 20 21 22 |
# File 'lib/rtask/spec.rb', line 17 def standard __getobj__.class.required_attributes + [:authors, :email, :homepage, :rubyforge_project, :description, :has_rdoc, :dependencies ] - [:rubygems_version, :specification_version, :date, :require_paths] end |
#type_of(name) ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'lib/rtask/spec.rb', line 34 def type_of(name) if array.include?(name) return :array elsif bool.include?(name) return :bool else return :string end end |