Class: Megam::KoniPai
- Inherits:
-
Object
- Object
- Megam::KoniPai
- Defined in:
- lib/megam/core/konipai.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ KoniPai
constructor
A new instance of KoniPai.
- #koni(arg = nil) ⇒ Object
- #konipai ⇒ Object
-
#to_hash ⇒ Object
Transform the ruby obj -> to a Hash.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ KoniPai
Returns a new instance of KoniPai.
4 5 6 |
# File 'lib/megam/core/konipai.rb', line 4 def initialize() @koni = nil end |
Class Method Details
.json_create(o) ⇒ Object
30 31 32 33 34 |
# File 'lib/megam/core/konipai.rb', line 30 def self.json_create(o) kp = new kp.koni(o) if o != null kp end |
Instance Method Details
#koni(arg = nil) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/megam/core/konipai.rb', line 12 def koni(arg=nil) if arg != nil @koni = arg else @koni end end |
#konipai ⇒ Object
8 9 10 |
# File 'lib/megam/core/konipai.rb', line 8 def konipai self end |
#to_hash ⇒ Object
Transform the ruby obj -> to a Hash
22 23 24 25 26 27 |
# File 'lib/megam/core/konipai.rb', line 22 def to_hash index_hash = Hash.new index_hash["json_claz"] = self.class.name index_hash["koni"] = koni index_hash end |
#to_s ⇒ Object
37 38 39 |
# File 'lib/megam/core/konipai.rb', line 37 def to_s Megam::Stuff.styled_hash(to_hash) end |