common_functions 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/common_functions.rb +39 -0
- data/lib/common_functions/railtie.rb +9 -0
- data/lib/common_functions/version.rb +3 -0
- data/lib/common_functions/view_helpers.rb +13 -0
- metadata +47 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 81630ff696fbb402d47ba25d7fece0cd8305ee28ed485f7fba0bf0fe821293d2
|
4
|
+
data.tar.gz: c8daa9a5cc395b7640889aed3175fa61cd681c6140256f81fff56cc03a1a4e55
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fae0fd19f4e3996d1aeb34519731b891e7fcbde8366011b55bbfae2b68211e03ae3ffdb282aefa9049f07f62f622b249036ff5b97be208e4a2e9e67d2decc1ee
|
7
|
+
data.tar.gz: 761584cf71276ee783406f009d80497c847ad50a679313a53eecf40edda5ee72cd2ae6b0a543b9a226dbbb968141d53d10ff34565c6b860351811ac6d5bef096
|
@@ -0,0 +1,39 @@
|
|
1
|
+
#require "common_functions/version"
|
2
|
+
#require "common_functions/view_helpers"
|
3
|
+
#require "common_functions/railtie" if defined? Rails
|
4
|
+
|
5
|
+
class Button
|
6
|
+
def self.primary_btn
|
7
|
+
"btn btn-primary"
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.primary_btn_sm
|
11
|
+
"btn btn-primary btn-sm"
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.success_btn
|
15
|
+
"btn btn-success"
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.success_btn_sm
|
19
|
+
"btn btn-success btn-sm"
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.danger_btn
|
23
|
+
"btn btn-danger"
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.danger_btn_sm
|
27
|
+
"btn btn-danger btn-sm"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
class DateTime
|
32
|
+
def self.print_date(timestamp)
|
33
|
+
timestamp.strftime("%F")
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.print_date_time(timestamp)
|
37
|
+
timestamp.strftime("%F %T")
|
38
|
+
end
|
39
|
+
end
|
metadata
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: common_functions
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- ShaimaKaraki
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-10-18 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Some common functions for Bootstrap tables and buttons.
|
14
|
+
email:
|
15
|
+
- shaimakaraki@gmail.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- lib/common_functions.rb
|
21
|
+
- lib/common_functions/railtie.rb
|
22
|
+
- lib/common_functions/version.rb
|
23
|
+
- lib/common_functions/view_helpers.rb
|
24
|
+
homepage: https://github.com/ShaimaKaraki/common_functions.git
|
25
|
+
licenses:
|
26
|
+
- MIT
|
27
|
+
metadata: {}
|
28
|
+
post_install_message:
|
29
|
+
rdoc_options: []
|
30
|
+
require_paths:
|
31
|
+
- lib
|
32
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 2.3.0
|
37
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
requirements: []
|
43
|
+
rubygems_version: 3.0.8
|
44
|
+
signing_key:
|
45
|
+
specification_version: 4
|
46
|
+
summary: Commom functions for Bootstrap tables and buttons.
|
47
|
+
test_files: []
|