Class: SBF::Client::Fund::YearlyTotals

Inherits:
BaseEntity
  • Object
show all
Defined in:
lib/stbaldricks/entities/fund.rb

Constant Summary

Constants inherited from BaseEntity

BaseEntity::ELSE

Instance Attribute Summary collapse

Attributes inherited from BaseEntity

#errors

Instance Method Summary collapse

Methods inherited from BaseEntity

#add_errors, allow_instantiation?, attr_accessor, attr_reader, attr_writer, attributes, #attributes=, collection_attributes, entity_attr_accessor, entity_attr_reader, entity_attr_writer, entity_attributes, entity_collection_attr_accessor, entity_collection_attr_reader, entity_collection_attr_writer, inherited, #initialize, #model_name, multitype_attr_accessor, multitype_attr_reader, multitype_attr_writer, multitype_collection_attr_accessor, multitype_collection_attr_reader, multitype_collection_attr_writer, #not_provided_attributes, optional_attributes, #persisted?, #to_json

Constructor Details

This class inherits a constructor from SBF::Client::BaseEntity

Instance Attribute Details

#amount_raisedObject (readonly)

Returns the value of attribute amount_raised.



31
32
33
# File 'lib/stbaldricks/entities/fund.rb', line 31

def amount_raised
  @amount_raised
end

#eventsObject (readonly)

Returns the value of attribute events.



30
31
32
# File 'lib/stbaldricks/entities/fund.rb', line 30

def events
  @events
end

#fundraisersObject (readonly)

Returns the value of attribute fundraisers.



25
26
27
# File 'lib/stbaldricks/entities/fund.rb', line 25

def fundraisers
  @fundraisers
end

#non_shaveesObject (readonly)

Returns the value of attribute non_shavees.



28
29
30
# File 'lib/stbaldricks/entities/fund.rb', line 28

def non_shavees
  @non_shavees
end

#participantsObject (readonly)

Returns the value of attribute participants.



26
27
28
# File 'lib/stbaldricks/entities/fund.rb', line 26

def participants
  @participants
end

#shaveesObject (readonly)

Returns the value of attribute shavees.



27
28
29
# File 'lib/stbaldricks/entities/fund.rb', line 27

def shavees
  @shavees
end

#teamsObject (readonly)

Returns the value of attribute teams.



29
30
31
# File 'lib/stbaldricks/entities/fund.rb', line 29

def teams
  @teams
end

#yearObject (readonly)

Returns the value of attribute year.



24
25
26
# File 'lib/stbaldricks/entities/fund.rb', line 24

def year
  @year
end

Instance Method Details

#to_hashObject



33
34
35
36
37
# File 'lib/stbaldricks/entities/fund.rb', line 33

def to_hash
  {}.tap do |hsh|
    self.class.attributes.each { |name| hsh[name] = send(name.to_sym) unless name.to_sym == :year }
  end
end