Module: Graphiti::Extensions::BooleanAttribute

Included in:
Serializer
Defined in:
lib/graphiti/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/graphiti/extensions/boolean_attribute.rb', line 13

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