class Elpong::Scheme
Attributes
data[R]
path[R]
Public Class Methods
new(path)
click to toggle source
# File lib/elpong/scheme.rb, line 6 def initialize(path) @path = path reload Elpong.schemes << self end
Public Instance Methods
name()
click to toggle source
# File lib/elpong/scheme.rb, line 12 def name @data['name'] end
reload()
click to toggle source
# File lib/elpong/scheme.rb, line 16 def reload file = File.read(@path) @data = JSON.parse(file) end
to_json()
click to toggle source
# File lib/elpong/scheme.rb, line 21 def to_json JSON.generate(@data) end