Showing 9 of 9 total issues
Class Obstacle
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Obstacle < Feature
include AIXM::Concerns::Association
include AIXM::Concerns::Remarks
public_class_method :new
File airport.rb
has 276 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using AIXM::Refinements
module AIXM
class Feature
Method add_to
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def add_to(builder)
builder.comment "Airport: #{id} #{name}".dress
builder.text "\n"
builder.Ahp({ source: (source if AIXM.ofmx?) }.compact) do |ahp|
ahp.comment(indented_comment) if comment
Method add_to
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def add_to(builder, delegate: true)
obstacle_group = self.obstacle_group || singleton_obstacle_group
return obstacle_group.add_to(builder) if delegate && AIXM.ofmx?
builder.comment "Obstacle: [#{type}] #{xy.to_s} #{name}".dress
builder.text "\n"
Method add_to
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def add_to(builder)
fail(LayerError.new("no layers defined", self)) unless layers.any?
builder.comment "Airspace: [#{TYPES.key(type)}] #{name || :UNNAMED}".dress
builder.text "\n"
builder.Ase({ source: (source if AIXM.ofmx?) }.compact) do |ase|
Method has_many
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def has_many(attribute, as: nil, accept: nil, &association_block)
association = attribute.to_s.inflect(:singularize)
inversion = as || self.to_s.inflect(:demodulize, :tableize, :singularize)
class_names = [accept || association].flatten.map { AIXM::CLASSES[_1.to_sym] || _1 }
(@has_many_attributes ||= []) << attribute
Method add_to
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def add_to(builder)
builder.Rdn do |rdn|
add_uid_to(rdn)
rdn.geoLat(threshold_xy.lat(AIXM.schema))
rdn.geoLong(threshold_xy.long(AIXM.schema))
Method add_to
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def add_to(builder)
builder.Rwy do |rwy|
add_uid_to(rwy)
if dimensions
rwy.valLen(dimensions.length.to_m.dim.trim)
Method add_to
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def add_to(builder)
builder.Timsh do |timsh|
timsh.codeTimeRef(adjust_to_dst? ? 'UTCW' : 'UTC')
timsh.dateValidWef(dates.begin.to_s('%d-%m'))
timsh.dateYearValidWef(dates.begin.year) if AIXM.ofmx? && !dates.begin.yearless?