Sha256: 48cf19c160fd5b16b98ffcfe9076d383d183c3187df1236de343bc94ad2c32a5
Contents?: true
Size: 1.22 KB
Versions: 1
Compression:
Stored size: 1.22 KB
Contents
class ConfigurableAttributeHandler < YARD::Handlers::Ruby::AttributeHandler handles method_call(:attr_configurable_str) handles method_call(:attr_configurable_client_beats) handles method_call(:attr_configurable_protocols) namespace_only def process name = statement.parameters.first.jump(:symbol, :ident).source namespace.attributes[scope][name] ||= SymbolHash[:read => nil, :write => nil] namespace.attributes[scope][name][:read] = YARD::CodeObjects::MethodObject.new(namespace, name) namespace.attributes[scope][name][:write] = YARD::CodeObjects::MethodObject.new(namespace, "#{name}=") register namespace.attributes[scope][name][:read] register namespace.attributes[scope][name][:write] end end class EventMethodsHandler < YARD::Handlers::Ruby::MethodHandler handles method_call(:create_event_methods) namespace_only def process base_name = statement.parameters.first.jump(:symbol, :ident).source[1..-1] statement.parameters[1..-1].each do |pref_sexp| if pref_sexp pref = pref_sexp.jump(:symbol, :ident).source[1..-1] name = "#{pref}_#{base_name}" object = YARD::CodeObjects::MethodObject.new(namespace, name) register object end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
onstomp-1.0.0pre1 | yard_extensions.rb |