Sha256: ecdbaa9af98a0207c4d8a4a63f493d7fc436e7973215fb051880cdd60983ad3d

Contents?: true

Size: 631 Bytes

Versions: 15

Compression:

Stored size: 631 Bytes

Contents

require "grape-entity"

module RestFtpDaemon
  module Entities
    class Location < Grape::Entity

      expose :original, as: '_'
      expose :uri
      expose :scheme

      expose :host, unless: Proc.new {|obj| obj.host.nil?}
      expose :user, unless: Proc.new {|obj| obj.user.nil?}
      expose :port, if: Proc.new {|obj| !obj.port.nil?}

      expose :dir
      expose :name
      expose :path

      expose :aws_region ,unless: Proc.new {|obj| obj.aws_region.nil?}
      expose :aws_bucket, unless: Proc.new {|obj| obj.aws_bucket.nil?}
      expose :aws_id,     unless: Proc.new {|obj| obj.aws_id.nil?}

    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rest-ftp-daemon-0.435.2 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-0.435.1 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-0.435.0 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-0.434.0 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-0.433.0 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-0.432.0 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-0.430.1 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-0.430.0 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-0.424.3 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-0.424.2 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-0.424.0 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-0.423.3 lib/rest-ftp-daemon/api/entities/location.rb
rest-ftp-daemon-0.423.2 lib/rest-ftp-daemon/api/entities/location.rb
rest-ftp-daemon-0.423.1 lib/rest-ftp-daemon/api/entities/location.rb
rest-ftp-daemon-0.423.0 lib/rest-ftp-daemon/api/entities/location.rb