Class: Cocoadex::DocSet
- Inherits:
-
Object
- Object
- Cocoadex::DocSet
- Defined in:
- lib/cocoadex/models/docset.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#platform ⇒ Object
readonly
Returns the value of attribute platform.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(plist_path) ⇒ DocSet
constructor
A new instance of DocSet.
- #inspect ⇒ Object
Constructor Details
#initialize(plist_path) ⇒ DocSet
Returns a new instance of DocSet.
6 7 8 9 10 11 12 13 |
# File 'lib/cocoadex/models/docset.rb', line 6 def initialize plist_path doc = Nokogiri::HTML(IO.read(plist_path)) @path = plist_path @name = plist_value doc, 'CFBundleName' @platform = plist_value doc, "DocSetPlatformFamily" @version = plist_value doc, "DocSetPlatformVersion" @description = plist_value doc, "DocSetDescription" end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/cocoadex/models/docset.rb', line 4 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/cocoadex/models/docset.rb', line 4 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
4 5 6 |
# File 'lib/cocoadex/models/docset.rb', line 4 def path @path end |
#platform ⇒ Object (readonly)
Returns the value of attribute platform.
4 5 6 |
# File 'lib/cocoadex/models/docset.rb', line 4 def platform @platform end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
4 5 6 |
# File 'lib/cocoadex/models/docset.rb', line 4 def version @version end |
Instance Method Details
#inspect ⇒ Object
15 16 17 |
# File 'lib/cocoadex/models/docset.rb', line 15 def inspect "<DocSet #{name} @description=#{description} @path=#{path}>" end |