Class: RPaste::Metadata
- Inherits:
-
Object
- Object
- RPaste::Metadata
- Defined in:
- lib/rpaste/metadata.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#author ⇒ Object
Author of the paste.
-
#name ⇒ Object
Name of the paste.
Instance Method Summary collapse
-
#initialize(name, author, &block) ⇒ Metadata
constructor
Creates a new Metadata object with the given name and author.
Constructor Details
#initialize(name, author, &block) ⇒ Metadata
Creates a new Metadata object with the given name and author. If a block is given, it will be passed the newly created Metadata object.
15 16 17 18 19 20 |
# File 'lib/rpaste/metadata.rb', line 15 def initialize(name,,&block) @name = name @author = block.call(self) if block end |
Instance Attribute Details
#author ⇒ Object
Author of the paste
8 9 10 |
# File 'lib/rpaste/metadata.rb', line 8 def @author end |
#name ⇒ Object
Name of the paste
5 6 7 |
# File 'lib/rpaste/metadata.rb', line 5 def name @name end |