librails 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/librails/form_param.rb +11 -9
- data/lib/librails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4353d673b25c199dd035f11a47cf60737117a24d
|
4
|
+
data.tar.gz: f32826e4d3f02ce3435f0b2e90d9c65a69f717ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6530cec6c5732874d4983f5a67a1fa6c8c7d8e075095d2b42ab8df667b2a10f204c8e4ac0423f87f8b867a0e9666801af2c36a2b04bb945687d68c31140853b9
|
7
|
+
data.tar.gz: 5610ef030cc3aa9b1b43be2375fca192309d02c0bc6ed3da62c2d29fa4eeca7e28425c872115d30883fe33fc34b65901d67eb129f1bd03a5fc420cae8101dd0f
|
@@ -1,13 +1,15 @@
|
|
1
1
|
# coding: utf-8
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
@label
|
2
|
+
module Librails
|
3
|
+
class FormParam
|
4
|
+
def initialize(id, label = nil, value = nil)
|
5
|
+
# 基本はIDとlabel。valueは特別な値を紐付けたい場合にのみ使用する。
|
6
|
+
@id = id
|
7
|
+
@label = label
|
8
|
+
if @label.nil?
|
9
|
+
@label = @id
|
10
|
+
end
|
11
|
+
@value = value
|
9
12
|
end
|
10
|
-
|
13
|
+
attr_accessor :id, :label, :value
|
11
14
|
end
|
12
|
-
attr_accessor :id, :label, :value
|
13
15
|
end
|
data/lib/librails/version.rb
CHANGED