Class: RPaste::Metadata

Inherits:
Object
  • Object
show all
Defined in:
lib/rpaste/metadata.rb

Direct Known Subclasses

NoPaste::Metadata, PasteBin::Metadata

Instance Attribute Summary collapse

Instance Method Summary collapse

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,author,&block)
  @name = name
  @author = author

  block.call(self) if block
end

Instance Attribute Details

#authorObject

Author of the paste



8
9
10
# File 'lib/rpaste/metadata.rb', line 8

def author
  @author
end

#nameObject

Name of the paste



5
6
7
# File 'lib/rpaste/metadata.rb', line 5

def name
  @name
end