Class: Julianus::Item
- Inherits:
-
Object
- Object
- Julianus::Item
- Defined in:
- lib/julianus/item.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#claimant ⇒ Object
Returns the value of attribute claimant.
-
#end_date ⇒ Object
Returns the value of attribute end_date.
-
#start_date ⇒ Object
Returns the value of attribute start_date.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(item) ⇒ Item
constructor
gives values to new item.
-
#to_s ⇒ Object
returns Item as Hash.
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
#amount ⇒ Object
Returns the value of attribute amount.
4 5 6 |
# File 'lib/julianus/item.rb', line 4 def amount @amount end |
#claimant ⇒ Object
Returns the value of attribute claimant.
4 5 6 |
# File 'lib/julianus/item.rb', line 4 def claimant @claimant end |
#end_date ⇒ Object
Returns the value of attribute end_date.
4 5 6 |
# File 'lib/julianus/item.rb', line 4 def end_date @end_date end |
#start_date ⇒ Object
Returns the value of attribute start_date.
4 5 6 |
# File 'lib/julianus/item.rb', line 4 def start_date @start_date end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'lib/julianus/item.rb', line 4 def status @status end |
Instance Method Details
#to_s ⇒ Object
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 |