Class: DSLJournal
Instance Attribute Summary
#finalpage, #initpage, #journal, #number, #volume
Attributes inherited from Reference
#authors, #date, #title
Instance Method Summary
collapse
#to_s
Methods inherited from Reference
#<=>, #get_title
Constructor Details
#initialize(&block) ⇒ DSLJournal
Returns a new instance of DSLJournal.
48
49
50
51
52
53
54
55
56
57
58
59
|
# File 'lib/prct11/DSL.rb', line 48
def initialize(&block)
self.title = []
self.date = []
self.number = []
self.volume = []
self.initpage =[]
self.finalpage = []
self.authors = []
self.title = ""
self.journal = []
instance_eval(&block)
end
|
Instance Method Details
#author(author) ⇒ Object
65
66
67
|
# File 'lib/prct11/DSL.rb', line 65
def author(author)
self.authors = author
end
|
#journalarticle(datos = {}) ⇒ Object
69
70
71
72
73
74
75
76
77
|
# File 'lib/prct11/DSL.rb', line 69
def journalarticle (datos = {})
self.title = datos[:nombre]
self.journal = datos[:periodico]
self.date = datos[:fecha]
self.number = datos[:numero]
self.volume = datos[:volumen]
self.initpage = datos[:paginicio]
self.finalpage = datos[:pagfinal]
end
|
#title_(titles) ⇒ Object
61
62
63
|
# File 'lib/prct11/DSL.rb', line 61
def title_(titles)
self.title = titles
end
|