lib/ugigi/scheme.rb in ugigi-0.3.3 vs lib/ugigi/scheme.rb in ugigi-0.4
- old
+ new
@@ -1,21 +1,21 @@
module Ugigi
class Scheme
attr_accessor :element
+
+ def initialize(element)
+ @element = element
+ end
def method_missing(action, *args)
return @element[action.to_s] rescue nil
end
def params() @element.keys.map{|k|k.to_sym} ; end
alias_method :available_methods, :params
end
- class Index < Scheme
- def initialize(element)
- @element = element
- end
-
+ class Index < Scheme
def to_sosowa_index
log = @element["link"].scan(/log=(\d+)/)[0][0].to_i
key = @element["link"].scan(/key=(\d+)/)[0][0].to_i
index = {
"log" => log,
\ No newline at end of file