Class: Fino::Settings::Numeric::Unit::Generic

Inherits:
Object
  • Object
show all
Defined in:
lib/fino/settings/numeric.rb

Direct Known Subclasses

Days, Hours, Milliseconds, Minutes, Seconds

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, short_name = nil) ⇒ Generic

Returns a new instance of Generic.



8
9
10
11
# File 'lib/fino/settings/numeric.rb', line 8

def initialize(name, short_name = nil)
  @name = name
  @short_name = short_name || name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/fino/settings/numeric.rb', line 6

def name
  @name
end

#short_nameObject (readonly)

Returns the value of attribute short_name.



6
7
8
# File 'lib/fino/settings/numeric.rb', line 6

def short_name
  @short_name
end

Instance Method Details

#base_factorObject



13
14
15
# File 'lib/fino/settings/numeric.rb', line 13

def base_factor
  1
end

#convertible_to?(_other) ⇒ Boolean

Returns:



17
18
19
# File 'lib/fino/settings/numeric.rb', line 17

def convertible_to?(_other)
  false
end