class Pendulum::DSL::Result
Attributes
output[RW]
type[RW]
Public Class Methods
new(type, &block)
click to toggle source
# File lib/pendulum/dsl/result.rb, line 5 def initialize(type, &block) self.type = type self.output = output_by(type) self.output.instance_eval(&block) if block_given? end
Public Instance Methods
to_url()
click to toggle source
# File lib/pendulum/dsl/result.rb, line 11 def to_url output.to_url end
Private Instance Methods
output_by(type)
click to toggle source
# File lib/pendulum/dsl/result.rb, line 17 def output_by(type) case type.to_sym when :treasure_data, :td Output::TreasureData.new when :postgresql Output::Postgresql.new when :nend Output::Nend.new else Output::Result.new(type) end end