Module: Ronin::Model::HasLicense::InstanceMethods

Defined in:
lib/ronin/model/has_license.rb

Overview

Instance methods that are added when Ronin::Model::HasLicense is included into a model.

Instance Method Summary collapse

Instance Method Details

#license!(name) ⇒ Object

Deprecated.

license! was deprecated in favor of #licensed_under.

Since:

  • 1.0.0



123
124
125
# File 'lib/ronin/model/has_license.rb', line 123

def license!(name)
  licensed_under(name)
end

#licensed_under(name) ⇒ License

Sets the license of the model.

Examples:

licensed_under :mit

Parameters:

  • name (Symbol, String)

    The name of the license to use.

Returns:

  • (License)

    The new license of the model.

Since:

  • 1.3.0



114
115
116
# File 'lib/ronin/model/has_license.rb', line 114

def licensed_under(name)
  self.license = Ronin::License.predefined_resource(name)
end