Class: Seimi::Formula::Component

Inherits:
Struct
  • Object
show all
Defined in:
lib/seimi/formula.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#atomic_massObject

Returns the value of attribute atomic_mass

Returns:

  • (Object)

    the current value of atomic_mass



9
10
11
# File 'lib/seimi/formula.rb', line 9

def atomic_mass
  @atomic_mass
end

#balance_symbolObject

Returns the value of attribute balance_symbol

Returns:

  • (Object)

    the current value of balance_symbol



9
10
11
# File 'lib/seimi/formula.rb', line 9

def balance_symbol
  @balance_symbol
end

#countObject

Returns the value of attribute count

Returns:

  • (Object)

    the current value of count



9
10
11
# File 'lib/seimi/formula.rb', line 9

def count
  @count
end

#elementObject

Returns the value of attribute element

Returns:

  • (Object)

    the current value of element



9
10
11
# File 'lib/seimi/formula.rb', line 9

def element
  @element
end

#symbolObject

Returns the value of attribute symbol

Returns:

  • (Object)

    the current value of symbol



9
10
11
# File 'lib/seimi/formula.rb', line 9

def symbol
  @symbol
end

Instance Method Details

#total_massObject



10
11
12
# File 'lib/seimi/formula.rb', line 10

def total_mass
  atomic_mass * count
end