UNPKG

873 BJavaScriptView Raw
1// Generated by CoffeeScript 1.9.3
2var Attr, Core, File;
3
4Core = require('./core');
5
6File = require('./file');
7
8Attr = (function() {
9 function Attr(_pageUrl, _find, _findType, _attr) {
10 this._pageUrl = _pageUrl;
11 this._find = _find;
12 this._findType = _findType;
13 this._attr = _attr;
14 this._attr = this._attr.toString();
15 }
16
17 Attr.prototype.value = function(val) {
18 if (val != null) {
19 this._attr = val;
20 }
21 return this._attr;
22 };
23
24 Attr.prototype.page = function(options) {
25 var url;
26 url = this._attr;
27 return Core.page(url, options);
28 };
29
30 Attr.prototype.download = function() {
31 var fileInstance, pageUrl, url;
32 url = this._attr;
33 pageUrl = this._pageUrl;
34 fileInstance = new File(url, pageUrl);
35 return fileInstance.download.apply(fileInstance, arguments);
36 };
37
38 return Attr;
39
40})();
41
42module.exports = Attr;