Class: Alpinist::Descriptor
- Inherits:
-
Object
- Object
- Alpinist::Descriptor
- Defined in:
- lib/alpinist/descriptor.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
readonly
Returns the value of attribute doc.
-
#ext ⇒ Object
readonly
Returns the value of attribute ext.
-
#href ⇒ Object
readonly
Returns the value of attribute href.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#reference ⇒ Object
Returns the value of attribute reference.
-
#rt ⇒ Object
readonly
Returns the value of attribute rt.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(id: nil, name: nil, type: nil, rt: nil, href: nil, doc: nil, ext: nil, reference: nil) ⇒ Descriptor
constructor
A new instance of Descriptor.
- #inspect ⇒ Object
Constructor Details
#initialize(id: nil, name: nil, type: nil, rt: nil, href: nil, doc: nil, ext: nil, reference: nil) ⇒ Descriptor
Returns a new instance of Descriptor.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/alpinist/descriptor.rb', line 6 def initialize(id: nil, name: nil, type: nil, rt: nil, href: nil, doc: nil, ext: nil, reference: nil) @id = id @name = name @type = type @rt = rt @href = href @doc = doc @ext = ext @reference = reference end |
Instance Attribute Details
#doc ⇒ Object (readonly)
Returns the value of attribute doc.
3 4 5 |
# File 'lib/alpinist/descriptor.rb', line 3 def doc @doc end |
#ext ⇒ Object (readonly)
Returns the value of attribute ext.
3 4 5 |
# File 'lib/alpinist/descriptor.rb', line 3 def ext @ext end |
#href ⇒ Object (readonly)
Returns the value of attribute href.
3 4 5 |
# File 'lib/alpinist/descriptor.rb', line 3 def href @href end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/alpinist/descriptor.rb', line 3 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/alpinist/descriptor.rb', line 3 def name @name end |
#reference ⇒ Object
Returns the value of attribute reference.
4 5 6 |
# File 'lib/alpinist/descriptor.rb', line 4 def reference @reference end |
#rt ⇒ Object (readonly)
Returns the value of attribute rt.
3 4 5 |
# File 'lib/alpinist/descriptor.rb', line 3 def rt @rt end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/alpinist/descriptor.rb', line 3 def type @type end |
Instance Method Details
#inspect ⇒ Object
17 18 19 20 21 |
# File 'lib/alpinist/descriptor.rb', line 17 def inspect display_variable_name = %w(@id @name @type @rt @href @doc @ext) variables_inspect = display_variable_name.map{ |n| "#{n}=#{instance_variable_get(n).inspect}" }.join(' ') "#<#{self.class}:#{__id__} #{variables_inspect}>" end |