Class: Julianus::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/julianus/item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(item) ⇒ Item

gives values to new item



7
8
9
10
11
12
13
# File 'lib/julianus/item.rb', line 7

def initialize item
	self.claimant = item[:claimant]
	self.start_date = item[:start_date]
	self.end_date = item[:end_date]
	self.amount = item[:amount]
	self.status = item[:status]
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



4
5
6
# File 'lib/julianus/item.rb', line 4

def amount
  @amount
end

#claimantObject

Returns the value of attribute claimant.



4
5
6
# File 'lib/julianus/item.rb', line 4

def claimant
  @claimant
end

#end_dateObject

Returns the value of attribute end_date.



4
5
6
# File 'lib/julianus/item.rb', line 4

def end_date
  @end_date
end

#start_dateObject

Returns the value of attribute start_date.



4
5
6
# File 'lib/julianus/item.rb', line 4

def start_date
  @start_date
end

#statusObject

Returns the value of attribute status.



4
5
6
# File 'lib/julianus/item.rb', line 4

def status
  @status
end

Instance Method Details

#to_sObject

returns Item as Hash



16
17
18
19
20
21
22
23
24
25
# File 'lib/julianus/item.rb', line 16

def to_s
	result = {
		:claimant => self.claimant, 
		:start_date => self.start_date,
		:end_date => self.end_date,
		:amount => self.amount,
		:status => self.status			
	}
	result
end