Class: Object

Inherits:
BasicObject
Defined in:
lib/csv_record/helpers.rb

Instance Method Summary collapse

Instance Method Details

#float?Boolean

Returns:

  • (Boolean)


7
8
9
10
# File 'lib/csv_record/helpers.rb', line 7

def float?
  /(?<number>^\d+\.\d+)$/ =~ self.to_s
  not number.nil?
end

#integer?Boolean

Returns:

  • (Boolean)


2
3
4
5
# File 'lib/csv_record/helpers.rb', line 2

def integer?
  /(?<number>^\d+$)/ =~ self.to_s
  not number.nil?
end

#to_paramObject



12
13
14
# File 'lib/csv_record/helpers.rb', line 12

def to_param
  self
end

#underscored_class_nameObject



16
17
18
# File 'lib/csv_record/helpers.rb', line 16

def underscored_class_name
  self.class.name.underscore
end