Class: IS::YARD::Sequel::AssociationsHandler
- Inherits:
-
YARD::Handlers::Ruby::Base
- Object
- YARD::Handlers::Ruby::Base
- IS::YARD::Sequel::AssociationsHandler
- Defined in:
- lib/yard-is-sequel/associations.rb
Instance Method Summary collapse
Instance Method Details
#process ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/yard-is-sequel/associations.rb', line 11 def process # Получаем имя ассоциации first_param = statement.parameters.first assoc_name = first_param.jump(:ident, :string_content).source.to_sym # Определяем тип ассоциации assoc_type = statement.method_name.source.to_sym # Извлекаем опции = # Определяем класс ассоциации assoc_class = determine_association_class(assoc_name, ) # Создаем атрибут в документации register_attribute(assoc_name, assoc_type, assoc_class) end |