Class: Newzcache::Nzb

Inherits:
Object
  • Object
show all
Defined in:
lib/newzcache/nzb.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, content, options = {}) ⇒ Nzb

Returns a new instance of Nzb.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/newzcache/nzb.rb', line 6

def initialize(client, content, options={})
  @client = client
  @content = content
  @id = options["id"]
  @title = options["title"]
  @content_type = options["content_type"]
  @group_id = options["group_id"]
  @newzbin_id = options["newzbin_id"]
  @pub_date = options["pub_date"]
  @size_in_bytes = options["size_in_bytes"]
  @is_hd = options["is_hd"]
  @meta_attributes = options["meta_attributes"]
  @info_url = options["info_url"]
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



3
4
5
# File 'lib/newzcache/nzb.rb', line 3

def client
  @client
end

#contentObject

Returns the value of attribute content.



4
5
6
# File 'lib/newzcache/nzb.rb', line 4

def content
  @content
end

#content_typeObject

Returns the value of attribute content_type.



4
5
6
# File 'lib/newzcache/nzb.rb', line 4

def content_type
  @content_type
end

#group_idObject

Returns the value of attribute group_id.



4
5
6
# File 'lib/newzcache/nzb.rb', line 4

def group_id
  @group_id
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/newzcache/nzb.rb', line 4

def id
  @id
end

#info_urlObject

Returns the value of attribute info_url.



4
5
6
# File 'lib/newzcache/nzb.rb', line 4

def info_url
  @info_url
end

#is_hdObject

Returns the value of attribute is_hd.



4
5
6
# File 'lib/newzcache/nzb.rb', line 4

def is_hd
  @is_hd
end

#meta_attributesObject

Returns the value of attribute meta_attributes.



4
5
6
# File 'lib/newzcache/nzb.rb', line 4

def meta_attributes
  @meta_attributes
end

#newzbin_idObject

Returns the value of attribute newzbin_id.



4
5
6
# File 'lib/newzcache/nzb.rb', line 4

def newzbin_id
  @newzbin_id
end

#pub_dateObject

Returns the value of attribute pub_date.



4
5
6
# File 'lib/newzcache/nzb.rb', line 4

def pub_date
  @pub_date
end

#size_in_bytesObject

Returns the value of attribute size_in_bytes.



4
5
6
# File 'lib/newzcache/nzb.rb', line 4

def size_in_bytes
  @size_in_bytes
end

#titleObject

Returns the value of attribute title.



4
5
6
# File 'lib/newzcache/nzb.rb', line 4

def title
  @title
end