Module: JsonapiCompliable::Extensions::BooleanAttribute

Defined in:
lib/jsonapi_compliable/extensions/boolean_attribute.rb

Overview

Turns ruby ? methods into is_ attributes

Examples:

Basic Usage

boolean_attribute :active?

# equivalent do
def is_active
  @object.active?
end

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



13
14
15
# File 'lib/jsonapi_compliable/extensions/boolean_attribute.rb', line 13

def self.included(klass)
  klass.extend ClassMethods
end